Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How Do I Re-direct My Site?


ace21gabriel

Recommended Posts

Ok, my site is linked to http://mrairsoft.com/ and http://www.mrairsoft.com/ this is not good for PR so I was wondering if there was anything I could do, I think it is probably in .httaccess that can allow anything from http://mrairsoft.com to add the www. into it so search engines will recognize it as one. And hopefully combine the pr3 and pr2 sites togather to get pr4. Please let me know if you have any ideas or hints for me.

 

Thanks alot!

Link to comment
Share on other sites

Backup your htaccess file then add the following to it and upload it

 

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^mrairsoft.com [nc]
rewriterule ^(.*)$ [url="http://www.mrairsoft.com/$1"]http://www.mrairsoft.com/$1[/url] [r=301,nc]

 

 

If your server is set-up for it, this should send all requests from http://mrairsoft.com to http://www.mrairsoft.com if it doesn't work restore your htaccess backup :)

 

Regards

 

Nigel

Link to comment
Share on other sites

A lot of sites have their URL both with and without the www at the beginning.

 

If you choose the www version then you shouldt use the trailing slash at the end...

that is... www . yourdomain . com/

then the search will take place looking for index or home or whatever etc.

IF you don't use the trailing slash... then the search looks to its second chance... that is without the www at the begining... and takes this path.

 

this of course is true the other way around as well...

 

i suspect that somewhere in your set up you have ommitted a trailing forward slash!

Link to comment
Share on other sites

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^mrairsoft.com [nc]
rewriterule ^(.*)$ http://www.mrairsoft.com/$1 [r=301,nc]

 

That worked great for the non https pages... But the ones with the SSL on them dont work. Any way to fix that?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...