.htaccess - Htaccess Rule Conflict -
I have written some htaccess rules. But there exists a confliction. I can not solve the problem.
rewrite ([az] +) / (. +). Php /$2.php?lang=$1 [QSA, L]
This rule for languages /en/login.php => /login.php?lang=en etc.
In addition to this I had another rule
RewriteRule ^ album / ([0-9]) / playlist \ .xml $ / xml / mediaxml.php? Album = $ 1
This rule is for a demo music album. Album / id / playlist.milk => in / xml / mediaxml.php? Album = $ 1
Our customers can listen to music with this playlist I wrote the first playlist.xml rule
When I supported the language I saw this problem
Edit:
All .htaccess code
Options + FollowSymLinks RewriteCond% RewriteEngine at {HTTP_HOST} dunyaturizm \ .com \ .tr $ RewriteRule (. *) Http://www.dunyaturizm.com.tr/$1 [R = 301, L] #PHP scriptleri languagelere dönderiyor RewriteRule ^ album / ([0-9] +) / playlist \ .xml $ included / xml / mediaxml.php? Album = $ 1 [QSA, L] RewriteRule ([az] +) / (. +) Php /$2.php? Lang = $ 1 [QSA, L] RewriteRule ^ n / $ http://www.dunyaturizm.com.tr/?lang=en # Urun Detay Sayfası RewriteRule ^ ([one-zA-Z0-9 _-] +) - ([0- 9] +) \. Html $ product.php? Pid = $ 2 & amp; Lang = trRewriteRule ^ en / ([a-zA-Z0-9 _-] +) - ([0- 9] +) \ .html $ product.php PID = $ 2 & amp ;? Lang = en #Kategori Sayfası RewriteRule ^ ([one-zA-Z0-9 _-] +) - ([0-9] +) $ product.php CID = $ 2 RewriteRule ^ sitemap \ .xml $ sitemap.php [ L] Error document 404 / 404.php
Rule the rules (first album Create rule) and flag it as L
, in this way the rule X will match it as soon as it matches:
RewriteRule ^ Album / ([0-9] +) / playlist \ .xml $ in / xml / mediaxml.php? Album = $ 1 [L] rewrite% {REQUEST_URI}! ^ / Xml / mediaxml \ .php $ rewrite ([AG] +) / (. +). Php /$2.php?lang=$1 [QSA, L]
Comments
Post a Comment