0
我试图创建这样一个链接:website.com/profile/name
来自: website.com/profile.php?name=Name
一切正常,只是当我使用一个名称在它的一个点。例如:website.com/profile/Alex。 这不起作用,只会从链接中删除点。所以基本上它不会在PHP中显示DOT。如何在htaccess链接中使用PERIOD?
这是我的htaccess代码。
RewriteEngine On
ErrorDocument 404 /alliance/404.php
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^([^/.]+)\.php - [F,L,R=404]
RewriteRule ^([^/.]+)$ $1.php [L]
RewriteRule ^profile/([^/.]+)$ ./profile.php?name=$1
感谢您的评论。但可悲的是,它不起作用。 –