gpt4 book ai didi

.htaccess - 配置文件系统的重写规则

转载 作者:行者123 更新时间:2023-12-04 07:22:45 26 4
gpt4 key购买 nike

我要重定向 website.com/member/gamiwebsite.com/member.php?name=gami我试过了:

RewriteRule ^(.*)/member$ member.php?name=$1 [NC, QSA]

最佳答案

使用您显示的规则,请尝试遵循 htaccess 规则。在测试您的 URL 之前,请确保清除浏览器缓存。

RewriteEngine ON
##Internal rewrite rules for non-existing uris to php files internally.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/$1.php -f
RewriteRule ^([^/]*)/(.*)/?$ $1.php?name=$2 [QSA,L]

关于.htaccess - 配置文件系统的重写规则,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68391906/

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