Jump to content

This line in htaccess should be?

Featured Replies

Posted

RewriteRule ^(.*)$ http://www.http://url.com/$1 [L,R=301]

should it be

RewriteRule ^(.*)$ http://www.url.com/$1 [L,R=301]

right?? just noticed it and i do not know these things to well?

anyone know?

Just i keep getting redundant hostname notifications in analytics hmm!

Yes :)
  • Author
2 hours ago, ASTRAPI said:

Yes :)

thanks

This might be a bit more flexible for you.

http:

RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

https:

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Just pick whichever works best for you.

  • Author
37 minutes ago, Tarun said:

This might be a bit more flexible for you.

http:


RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

https:


RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Just pick whichever works best for you.

if i dont use https should i still add that part too?

If you don't use https, use the http segment of the code.

  • Author
1 minute ago, Tarun said:

If you don't use https, use the http segment of the code.

thanks!

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.