apache - How to replace question mark and equal to symbol with slash in url using .htaccess -
i want replace question mark , equal symbol slash in url using .htaccess, have tried .htaccess rules , replacing fine web page not opening , giving error 'internal server error'. tried rules
actual url: http://www.example.com/hotel_details?id=2
require url: http://www.example.com/hotel_details/id/2
options +followsymlinks rewriteengine on # remove index.php expressionengine urls rewritecond %{the_request} ^get.*index [nc] rewritecond %{request_uri} !/system/.* [nc] rewriterule (.*?)index/*(.*) /$1$2 [r=301,ne,l] # remove .php extenstion urls rewritecond %{request_filename} !-d rewritecond %{request_filename}\.php -f rewriterule ^(.*)$ $1.php # replace ? , = / rewritecond %{the_request} ^[a-z]{3,}\s/+([^.]+)\?([^=]+)=([^\s&]+) [nc] rewriterule ^ /%1/%2/%3? [l,r=301]
all above code working fine instead of replace ?
, =
/
.
Comments
Post a Comment