Jump to content


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


Use website.com or www.website.com?

Recommended Posts

Hi Jack,

I added the two things you have in your htaccess file into mine (which I've posted here). It's not working properly so I think there is some code I need to change somewhere. What happens now is all my pages go to the index when I include the non-www redirect. In the thread I saw that you recommended Ultimate SEO a lot which I have installed already. There is a bunch of code the person you were helping kept adding and it seems like you told her to take it out. Can you please tell me what code change is needed? Thanks a lot for your direction I really appreciate it!


I have a catalog folder named products that holds my store. My htaccess file is in that folder and I added these rules to the rules there already.


#redirect non-www to www

RewriteCond %{HTTP_HOST} ^shedsforlessdirect\.com

RewriteRule ^(.*)$ http://www.shedsforlessdirect.com/products/$1



#redirect index.php to root

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

RewriteRule ^index\.php$ http://www.shedsforlessdirect.com/products/



Another thing that might be affecting is in my root folder, since my store is in a catalog folder, I have another htaccess file which permanently redirects to the catalog:

RedirectMatch permanent ^/$ http://www.shedsforlessdirect.com/products/


Is this causing a conflict? Is there more code I'm missing? Thank you!

Share this post

Link to post
Share on other sites


Bundle of thanks. I have read the thread in detail and implemented code in html_output.php and it worked great for me.


Please refer to the thread below:



<IfModule mod_rewrite.c>


RewriteEngine on

RewriteBase /


RewriteCond %{HTTP_HOST} !^www\.mysite\.com

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


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

RewriteRule ^index\.php$ http://www.mysite.com/ [R=301,L]




Now as you said in the thread, I want to redirect all traffic coming to existing http://fashno.com to http://www.fashno.com instead so SE will not consider duplication and you have give this code. Please guide where to put this code (filename) and place to place in which file?




Share this post

Link to post
Share on other sites