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
Post a Comment