.htaccess rule conflict with previous defined rules -
.htaccess rule conflict with previous defined rules -
right have next .htaccess rules:
rewriterule ^(.*)/(.*)_([0-9]+)/$ index.php?section_permalink=$1&content_permalink=$2&content_id=$3 [qsa,l] rewriterule ^(.*)/p-([0-9]+)/$ index.php?section_permalink=$1&page=$2 [qsa,l] rewriterule ^(.*)/$ index.php?section_permalink=$1 [qsa,l]
everything works fine, if add together next rule, every time seek access /route/10/ (for example) redirected home page.
rewriterule ^route/(.*)/$ route.php?route=$1 [qsa,l]
how can rewrite rule avoid issue?
thank you.
rewriterule
s executed in order in file. rewriterule ^(.*)/$ index.php?section_permalink=$1 [qsa,l]
matches url , url rewritten index.php?section_permalink=route/10
. doesn't match next rewriterule.
swapping more specific rule , and more-or-less catch-all rule solve issue, since more specific rule matched first.
.htaccess
Comments
Post a Comment