.htaccess - Giving parameters to php with RewriteRule -
i need rewriterule call php file parameters specified in url entred
ex : if url entered http://www.example.com/folder1/sub1
to make call go.php?p1=folder1&p2=sub1
try using
rewriteengine on rewritebase / rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule (.*)?/(.*) /go.php?p1=$1&p2=$2
where rewritecond %{request_filename} !-f
,!-d
tell mod_rewrite
apply rule paths not mapped existing files , directories.
Comments
Post a Comment