php - path in query parameter append to url in .htaccess -


i trying make below url

http://localhost/base/path/to/redirect/1-2-master/list.xh

redirect to

http://localhost/base/list.php?r=path/to/redirect/1-2-master

i have tried this. getting 404 error.

rewriteengine on rewriterule ^(.*)base/(.*)/list.xh$ $1base/list.php?r=$2 [nc,l] 

but when tested on http://htaccess.mwl.be/ , working fine

assuming there no base/.htaccess can use rule in root .htaccess:

rewriteengine on  rewriterule ^(base)/(.+)/list\.xh$ $1/list.php?r=$2 [l,qsa,nc] 

Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -