url rewriting - Adding rewrite conditions to the existing ones -


we had out customer request redirect custom url specific page in webshop directory, setup rewrite rule rewrie condition shown below

rewritecond %{http_host} abc.xxx.com$ [nc] rewriterule ^/$ /online/index.php3?shopid=111 [r] rewritecond %{https_host} abc.xxx.com$ [nc] rewriterule ^/$ /online/index.php3?shopid=111 [r] 

as shown in above rules , condition request coming abc.xxx.com redirected web page in webshop id 111 , worked successfully

after few weeks same customer had request add url redirection differn webshop id 112 used similar rewrite rule , condition replacing new url , webshop id, , added below old rewrite condition , rules , restarted apache when tested new url redirecting shop id 111 instead of 112.

rewritecond %{http_host} def.xxx.com$ [nc] rewriterule ^/$ /online/index.php3?shopid=112 [r] rewritecond %{https_host} def.xxx.com$ [nc] rewriterule ^/$ /online/index.php3?shopid=112 [r] 

later had work around , changed order,i put new rewrite rules , conditions first i.e ahead of old rules , worked perfaclty fine.

does have idea characteristic of rewrite rules?


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -