Forum Moderators: phranque

Message Too Old, No Replies

Non-WWW to WWW 301 minus one folder

         

bears5122

4:50 pm on Sep 30, 2005 (gmt 0)

10+ Year Member



I'm currently doing a 301 from the non-www version of a site to a www version using the following in .htaccess :

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com
RewriteRule (.*) [domain.com...] [R=301,L]

However, the client uses a shopping cart that is setup to run only on the non-www version. In fact, this 301 will mess up his shopping cart and not allow it to function properly. Fortunately, it is in a folder.

Is there anyway I can 301 non-www on the site to www minus one folder?

jdMorgan

5:30 pm on Sep 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sure,

Use


RewriteCond %{REQUEST_URI} !/folder/

ahead of your other RewriteCond.

For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

Jim