J'ai l'URL ci-dessous que je veux utiliser. Toute aide appréciée.Joli URL htaccess
À partir de;
http://www.example.co.uk/search-menu?r_id=1&name=testname
Pour
http://www.abklab.co.uk/search-menu/1/testname
J'ai essayé ci-dessous mais obtenir Internal Server Error
# external redirect from actual URL to pretty one (WEB)
RewriteCond %{THE_REQUEST} \s/+search-menu(?:\.php)?\?r_id=([^\s&]+)&name=([^\s&]+) [NC]
RewriteRule^/search-menu/%1/%2? [R=302,L,NE]
# internal forward from pretty URL to actual one (WEB)
RewriteRule ^search-menu/([\w-]+)/([\w-]+)/?$ search-menu.php?r_id=$1&name=%2 [L,QSA,NC]
Pour votre information: Voici la règle supprime le site d'extension .php large;
# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule^%1 [R=302,L]
## To internally redirect /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME}.php -f [NC]
RewriteRule ^(.+?)/?$ $1.php [L]
RewriteRule^$ Page = 1 $ et section = 2 $ - l'expression rationnelle ne peut pas être 100% correct, il vous donnera une idée –
@ moh.ABK (*.)? votre fichier .htaccess – LaughingQuoll