php - HTAcess ReWrite Rules Conflicting? -
php - HTAcess ReWrite Rules Conflicting? -
i have 2 re-wrtie rules 1 vanity url illustration domain.com/url , 1 edit info aka post.
for reason first rule taking place , not both
why , how can prepare it??
here's code
rewriteengine on # create sure match on files/directories don't exist rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritebase / # rewrite first part after `/` `username` parameter rewriterule ^(.+)$ groups/index.php?gname=$1 [l,qsa] rewriterule ^edit/id/([0-9]+)/?$ groups/view_update.php?pid=$1 [nc,qsa,l]
thanks :)
rewritecond
applicable next rewriterule
not rewriterule
. alter order of rules.
change code this:
rewriteengine on # create sure match on files/directories don't exist rewritebase / # rewrite first part after `/` `username` parameter # skip rewrite rules file or directories rewritecond %{request_filename} -f [or] rewritecond %{request_filename} -d rewriterule ^ - [l] rewriterule ^edit/id/([0-9]+)/?$ groups/view_update.php?pid=$1 [nc,qsa,l] rewriterule ^(.+)$ groups/index.php?gname=$1 [l,qsa]
php .htaccess url mod-rewrite redirect
Comments
Post a Comment