大佬教程收集整理的这篇文章主要介绍了.htaccess 问题,我无法删除 .php,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我需要你的帮助。 我有这个网址:www.myurl.com/?verfy=CDPOR888 或 www.myurl.com/index.php?verfy=CDPOR888
我想变成这样:www.myurl.com/CDPOR888
请帮忙,我如何使用 .htaccess 来实现?
我在 .htaccess 中尝试了这段代码,但没有工作:
RewriteRule ^([^/]*)\.php$ /?perms_verify=$1 [QSA,L,NC]
注意:.htaccess 不区分大小写
请更换此规则!
RewriteENGIne On
RewriteCond %{requEST_FILename} !-f
# Use this rule
RewriteRule ^([^\.]+)$ $1.php [NC,L]
,
你可以使用这个规则:
RewriteENGIne On
# request is not for a file
RewriteCond %{requEST_FILename} !-f
# request is not for a directory
RewriteCond %{requEST_FILename} !-d
# rewrite to desTination path
RewriteRule ^([\w-]+)/?$ ?verfy=$1 [QSA,L]
,
将您的 .htaccess 文件更新为
DirectoryIndex index.php
# remove the next 3 lines if you see a 500 server error
FileETag none
ServerSignature Off
Options All -Indexes
<IfModule mod_rewrite.c>
RewriteENGIne On
RewriteRule ^([0-9a-zA-Z_-]{1,16})$ index.php?verify=$1 [L]
</IfModule>
以上是大佬教程为你收集整理的.htaccess 问题,我无法删除 .php全部内容,希望文章能够帮你解决.htaccess 问题,我无法删除 .php所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。