Welcome to WebmasterWorld Guest from 54.234.38.8

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)

Preferred Member

10+ Year Member

joined:Sept 16, 2003
posts:485
votes: 0


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)

Senior Member

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

joined:July 3, 2002
posts:18903
votes: 0


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

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members