Forum Moderators: phranque
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
However, I still want the links to forward to the new domain, but I want to make it so a few directories don't forward. For example, when I type in www.OLDDOMAIN.com/information -- I want it to go to the old domain, not the new domain.
How can I do this? Thanks.
[edited by: jdMorgan at 3:46 am (utc) on July 28, 2007]
[edit reason] example.com [/edit]
Options +FollowSymLinks
RewriteEngine on
# Exclude /information directory from redirect
RewriteCond $1 !^information
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
Options +FollowSymLinks
RewriteEngine on
# Exclude /information directory from redirect
RewriteCond %{REQUEST_URI} !^/information
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
You can also use the "local OR" construct instead of multiple RewriteConds, that is:
RewriteCond %{REQUEST_URI} !^/(dir1¦dir2¦dir3)
RewriteCond %{REQUEST_URI} !^/dir1
RewriteCond %{REQUEST_URI} !^/dir2
RewriteCond %{REQUEST_URI} !^/dir3
Be sure to change the broken pipe "¦" characters above to solid pipes before use; Posting on this forum modifies the pipe characters.
Jim