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

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -