Welcome to WebmasterWorld Guest from 54.198.222.129

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

301 non-www to www except for one directory

Need to let requests for one directory pass through without redirecting

     
5:11 pm on Mar 12, 2011 (gmt 0)

10+ Year Member



We've recently migrated our website technology to a new platform and have set up a CNAME record to point www.example.com to the new server.

The A record for example.com points at our old server and we use the following .htaccess to redirect requests for example.com to the new site.

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=permanent,L]


We'd like requests for example.com/images to pass through without any 301 redirects though. Can anyone give me pointers on how to modify our .htaccess to accomplish this?
8:36 pm on Mar 12, 2011 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Place this condition ahead of the existing ruleset:
RewriteCond %{REQUEST_URI} !/images
 

Featured Threads

Hot Threads This Week

Hot Threads This Month