htaccess模型链接在域后添加点


htaccess model link add dot after domain

你好,我在我的网站上用htaccess创建修改链接。但是我有一个问题

此代码htaccess:

RewriteRule ^([^/'.]+)$                                     page4.php?link=$1 [L]

我尝试类型:

www.sampledomain.com/linkname

在这项工作中,我将数据库中的价值模型链接更改为"link.name"

但我尝试键入:

www.sampledomain.com/link.name

404未找到:(

如何解决这个问题?帮助我感谢

更改正则表达式模式并添加几个RewriteCond:

# If the request is not for a valid directory
RewriteCond %{REQUEST_FILENAME} !-d
# If the request is not for a valid file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/?$ page4.php?link=$1 [L,QSA]