localhost / visvabharati / archive.html / type / notice
c'est mon url.Je veux le réécrire comme
localhost / visvabharati / archive.php? type = notice
S'il vous plaît aidez-moi comment serait le htaccess
utilisant actuellement
AddHandler x-mapp-php5 .php
Options +FollowSymLinks
RewriteEngine on
#RewriteBase /
DirectoryIndex index.php?url_key=index [T=application/x-httpd-php,L]
RewriteRule ^([^/]*).html$ /index.php?url_key=$1 [T=application/x-httpd-php,L]
RewriteRule ^([^/]*).html-([^/]*)$ /index.php?url_key=$1&id=$2 [T=application/x-httpd-php,L]
Mais sa donne 500. S'il vous plaît aidez-moi à trier Cordialement
Réponses:
0 pour la réponse № 1Ce code ici le fera pour une page.
RewriteRule ^localhost/visvabharati/archive.html/(.+)/(.+) localhost/visvabharati/archive.php?$1=$2
Si vous devez le faire pour plusieurs pages, cela devrait fonctionner.
RewriteRule ^localhost/visvabharati/(.+).html/(.+)/(.+) localhost/visvabharati/$1.php?$2=$3
0 pour la réponse № 2
En supposant visvabharati
est un directeur.
Placez ceci dans /visvabharati/.htaccess
:
RewriteEngine on
RewriteBase /visvabharati/
RewriteRule ^([^.]+).html/([^/]+)/([^/]+)/?$ $1.php?$2=$3 [L,QSA,NC]
Aussi vous devez enlever tout le code indiqué dans votre question.