>我有一个非常简单的重写规则。我的整个 .htaccess 文件如下:
RewriteEngine On
RewriteRule ^login/([a-zA-Z0-9-/]+)$ company-page.php?company_url=$1
RewriteRule ^login/([a-zA-Z0-9-/]+)/$ company-page.php?company_url=$1
这在本地Wamp服务器上完美运行,但在在线服务器上不起作用。它显示以下错误。!
The requested URL /EZsample/login/mereco-technologies/ was not found on this server.
谁能帮我!
如果您使用的是VPS,请使用本文,
1.确保您已启用Mod_Rewrite?2.在虚拟主机配置中进行了更改
https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_rewrite
这行代码帮助我解决了一个非常相似的问题:
Options -MultiViews