The Apache Haus Forum

Advanced search  

News:

Welcome to Apache Haus Distribution Forum

Pages: [1]   Go Down

Author Topic: Redirect Port with mod_rewrite  (Read 4995 times)

mario

  • Administrator
  • Member Elite
  • *****
  • Offline Offline
  • Posts: 575
Redirect Port with mod_rewrite
« on: January 06, 2009, 05:45:18 PM »

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


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

or

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

more than one folder can be

Code: [Select]
^/(?!exception/|otherfolder1/|otherfolder2/)(.*)
Logged
Pages: [1]   Go Up
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13