apache - How do I rewrite this url with htaccess / mod_rewrite? -
how rewrite url .htaccess mod_rewrite
http://55.100.10.66:81/var/class/tag?isajax=true&id=189&key=ejwvxzeowjamb&callback=_prototypejsonpcallback_0
to
http://55.100.10.66:81/index.php/var/class/tag?isajax=true&id=189&key=ejwvxzeowjamb&callback=_prototypejsonpcallback_0
amongst lot of things tried below doesn't work
rewriterule ^var/class/tag(.*) /index.php/var/class/tag$1 [l,nc,qsa]
thanks!
this solution
rewritecond %{request_uri} ^/var/class/tag(.*) rewriterule .* index.php [l]
you cannot match query_string rewriterule. enable mod_rewrite , .htaccess through httpd.conf
, put code in .htaccess
under document_root
directory:
options +followsymlinks -multiviews # turn mod_rewrite on rewriteengine on rewritebase / rewriterule ^(var/class/tag/?)$ /index.php/$1 [l,nc]
Comments
Post a Comment