php - how to replace all the ? and = by / htaccess -


hello have site in replace ? , = of urls / . know cn done htaccess file new htaccess

i have code in htaccess file

errordocument 404 /error404.php errordocument 403 /error404.php  options -indexes   rewriteengine on  rewritebase /    rewritecond %{request_method} post [nc]   rewriterule ^ - [l]   rewritecond %{http_referer} !^http://(www\.)?domain.*$ [nc]    rewriterule \.(gif|jpg|jpeg)$ http://www.domain.com [l]    rewritecond %{http_host} !^www\.  rewriterule ^(.*)$ http://www.%{http_host}/$1 [r=301,l]    rewritecond %{the_request} \s/+(page1)\.php\?eid=(78)[&\s] [nc]   rewriterule ^ /%1/%2? [r=301,l]    rewriterule ^(page1)/(\d+)$ /$1.php?eid=$2 [l,qsa,nc]       rewritecond %{the_request} \s/+page2\.php\?url=([^\s&]+) [nc]    rewriterule ^ /%1? [r=301,l]       rewritecond %{the_request} \s/+(.+?)\.php[\s?] [nc]      rewriterule ^ /%1 [r=302,l,ne]       rewritecond %{request_filename} !-d    rewritecond %{document_root}/$1\.php -f [nc]  rewriterule ^(.+?)/?$ /$1.php [l]     rewritecond %{request_filename} !-f  rewritecond %{request_filename} !-d  rewriterule ^(.+)$ /page2.php?url=$1 [l,qsa] 

thnkx in advance ... wana replace ? , = of url /

    domain.com/page.php?id=44      domain.com/page/id/4 

first off, need clarify intend accomplish.

if intend have user visit domain.com/page/id/4 , have internally rewritten page.php?id=4, have 2 options:

1) use rewrite rule, such as:

rewriterule ^/?page/([^/]+)/(.+)$ page.php?$1=$2 2) (preferred) use multiviews , have php script logic parsing the

request_uri ($_server['request_uri']).


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -