当我启用mod_rewrite时,当我第二次点击链接时页面名称显示在url twicw中,它可以正常工作:/ secure / UITA / video / video / showlibrary / 1/4/4 视频是我的php页面
请给我解决方案
RewriteEngine On
RewriteCond %{THE_REQUEST} \s/+video\.php\?task=([^\s&]+) [NC]
RewriteRule ^ video/%1? [R=302,L]
RewriteRule ^video/([\w-_:]+)/?$ video.php?task=$1 [L,NC,QSA]
RewriteCond %{THE_REQUEST} \s/+video\.php\?task=([^\s&]+)&vendorid=([^&]*)&certid= ([^&]*)&examid=([^&]*) [NC]
RewriteRule ^ video/%1/%2/%3/%4? [R=302,L]
RewriteRule ^video/([\w-_:]+)/([0-9]+)/([0-9]+)/([0-9]+)?$ video.php?task=$1&vendorid=$2&certid=$3&examid=$4 [L,NC,QSA]
# PHP hiding rule
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php [L]
答案 0 :(得分:0)
将此添加到您网页的标题中:
<base href="/" />