regex - htaccess rewrite rule for specific domain -


so have rule that's working perfectly:

rewriterule ^images_designs/([^.]+)-d00([^/]+)\.png$ /image_design_watermark.php?design=$2 [l,qsa,nc] 

now add additional "language" variable related domain htaccess used on

i have tried it's not working:

rewritecond %{http_host} ^(ni-dieu-ni-maitre|blablabla)\.com$ [nc]  rewriterule images_designs/([^.]+)-d00([^/]+)\.png$ /image_design_watermark.php?design=$2&language=fr [l,qsa,nc]  rewritecond %{http_host} ^(no-gods-no-masters|ni-dios-ni-amo)\.com$ [nc] rewriterule images_designs/([^.]+)-d00([^/]+)\.png$ /image_design_watermark.php?design=$2&language=en [l,qsa,nc] 

the %{http_host} includes subdomains should add www that.

rewritecond %{http_host} ^(?:www\.)?(ni-dieu-ni-maitre|blablabla)\.com$ [nc] 

and

rewritecond %{http_host} ^(?:www\.)?(no-gods-no-masters|ni-dios-ni-amo)\.com$ [nc] 

or make looser , take off starting anchor, ^ i'd go route though.

reference: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -