apache - Redirect whole subfolder to a handler -


i have folder in subfolder www directory

like

www/somesub

there put htaccess file has following rewrite rule in it:

rewriteengine on       rewriterule ^ajax/(.+?)/(\w+)/(\w+?)$ /ajax/handler.php?any=$1&idea=$2&lol=$3 [l] 

this should redirect calls sub directory ajax handler inside... sadly dous not work... idea why?

examlple be:

domain/somesub/ajax/some/notsoawsome/code 

to

domain/somesub/ajax/handler?any=some&idea=notsoawsome&lol=code 

any suggestions?

not sure why code doesn't work, may try 1 in .htaccess file @ somesub directory:

options +followsymlinks -multiviews rewriteengine on rewritecond %{request_uri}  ^/(.+)/ajax/([^/]+)/([^/]+)/([^/]+)/? [nc] rewriterule .*     /%1/ajax/handler.php?any=%2&idea=%3&lol=%4        [l,nc] 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -