apache - .htaccess rewrite but it get wrong parameter -


that's link

a.http://domaim/category/para1 b.http://domaim/category/para1/ c.http://domaim/category/para1/para2 d.http://domaim/category/para1/para2/ 

paramater string (urlencode or others)

and that's .htacess

rewriteengine on rewriterule ^category/([^/]+)$ category.php?mid=$1 rewriterule ^category/([^/]+)/([^/]+)$ category.php?mid=$1&sid=$2 

a , c right parameter,but b , d page no found!! error 404

then try modify .htacess wrong

rewriteengine on rewriterule ^category/(.*)$ category.php?mid=$1 rewriterule ^category/([^/]+)/(.*)$ category.php?mid=$1&sid=$2 

check ending "/" too:

rewriteengine on rewriterule ^category/([^/]+)([/]{0,1})$ category.php?mid=$1 rewriterule ^category/([^/]+)/([^/]+)([/]{0,1})$ category.php?mid=$1&sid=$2 

Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Restarting Supervisor and effect on FlaskSocketIO -

php - Mongodb connectivity error -