gpt4 book ai didi

php - 当我点击链接时 mod_rewrite 页面名称两次

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:31:52 28 4
gpt4 key购买 nike

当我启用 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]

最佳答案

将此添加到您的页面标题:

<base href="/" />

关于php - 当我点击链接时 mod_rewrite 页面名称两次,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26003068/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com