php - htaccess redirect to other domain except for specific request -


we're stuck on problem regarding .htaccess

we need website redirect domain, except if user wants /intranet uri. should go on index.php

we tried following it's redirecting both

rewriteengine on rewritecond %{request_uri} /intranet rewriterule .* index.php [l] rewriterule .* http://google.be 

we tried this

rewriteengine on rewritecond %{request_uri} !^/intranet rewriterule .* http://google.be rewriterule .* index.php [l] 

but without results, .htaccess hero can us! thanks

problem use of request_uri variable changes it's value index.php in last rule. need use the_request variable doesn't updated.

use code:

rewriteengine on  rewritecond %{the_request} !/intranet [nc] rewriterule ^ http://google.be [l,r]  rewriterule ^ index.php [l] 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -