.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.

rewriterules 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

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -