The Apache Haus Forum

Forum Topics => Webmaster Tools, Tips and Tricks => Topic started by: mario on January 06, 2009, 05:45:18 PM

Title: Redirect Port with mod_rewrite
Post by: mario on January 06, 2009, 05:45:18 PM
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/)(.*)