apache - .htaccess forward domain except some directories -


i want forward content of mydomain.com mydomain.somewhereelse.com want www.mydomain.com/mail , www.mydomain.com/stats not forwarded new address.

how should this? there if else solution?

rewriteengine on rewritebase / rewriterule ^mail squirrelmail/src/login.php [r,nc] rewriterule  ^(.*)  http://new.example.com/$1 

above not work.

you can use rule first rule below rewritebase line:

rewritecond %{http_host} ^(www\.)?mydomain\.com$ [nc] rewriterule !^(mail|stats) http://mydomain.somewhereelse.com%{request_uri} [l,nc,r=302] 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -