Jump to content

Recommended Posts

Posted

I would like to setup canonical domain names for SEO purposes. I used method described Here. But when I edit .htaccess file exactly described there and upload to server, I get this error message:

"The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete."

 

What am I doing wrong.

 

Thanks

Posted (edited)

This is the first one which I tried:

 

Options +FollowSymlinks

RewriteEngine on

RewriteCond %{HTTP_HOST} ^mywebsite\.com

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

 

 

 

This is the second one which I tried:

 

Options +FollowSymlinks

RewriteEngine on

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/

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

 

At second rule my website has index.php as well.

Both caused same error.

Edited by polat
Posted

This should work if placed in "public_html"

 

><IfModule mod_rewrite.c>
  Options +FollowSymLinks
  RewriteEngine On
  RewriteBase /
  RewriteCond %{HTTP_HOST} ^www\.your-domain\.com$
  RewriteRule ^(.*)$ http://your-domain.com/$1 [R=301,L]
</IfModule>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...