Redirect Port with mod_rewrite

Started by mario, January 06, 2009, 05:45:18 PM

Previous topic - Next topic

mario

This is how to redirect a whole domain, but not the folder "exception".



RewriteRule ^/exception - [L]
RewriteRule ^/(.*) http://www.example.com:8080/$1


or


RedirectMatch permanent ^/(?!exception/)(.*) http://www.example.de:8080/$1


more than one folder can be


^/(?!exception/|otherfolder1/|otherfolder2/)(.*)