htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: www vs Non-www, Separate Homepage & Blog
PostPosted: May 17th, '08, 10:37 
Offline

Joined: May 14th, '08, 15:38
Posts: 1
Hi there,

I have a a wordpress blog installed in www.example.com/blog/. When I type www.example.com/blog/ OR example.com/blog/ in my firefox/IE7 address bar, the result will appear as www.example/com/blog/. I believe this is what they call , a canonical form of URL (please correct me if I am wrong).

For my homepage, when I type example.com in my firefox/IE7 address bar, it will then appear as example.com . If I type www.example.com, it will then appear to be www.example.com . So this is a non-canonical form of URL ?

I have done some search in some other forums, and came out with several 301 redirect results, but I am not sure which to use.

Code:
Options +Indexes
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteRule ^whatever/(.*)$ http://www.domain.com/$1/ [R=301,L]


This is the 301 redirect code that I've came up with.

Question 1 : Should I use this code to re-direct my homepage URL ?

Question 2 : If I have decided to add the code above, into my root folder's .htaccess file, will it affect my wordpress blog which was being installed in www.example.com/blog/ ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB