Forum Moderators: phranque

Message Too Old, No Replies

non-www to www folder redirect 3 rather than 2

         

UnEmployedAfterSchoo

4:58 pm on Sep 6, 2006 (gmt 0)

10+ Year Member



I have setup the .htaccess following way:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST}!^www\.mysite\.com [NC]
RewriteRule ^(.*)$ [mysite.com...] [L,R=301]

I have a blog folder and installed wordpress. Also put in plugin for non-www reference.
Can someone tell me how I can get the following (3 redirets):

[mysite.com...]
[mysite.com...]
httyp://www.mysite.com/blog/

What I need is:
[mysite.com...] => [mysite.com...]

How do I fix this?

jdMorgan

5:36 pm on Sep 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's not clear what you want here, but to answer your last question:

RewriteRule ^blog$ http://www.example.com/blog/ [R=301,L]

This directive must be placed in the .htaccess file in the directory *above* /blog, or in httpd.conf.

Jim

[edited by: jdMorgan at 5:36 pm (utc) on Sep. 7, 2006]