繁体   English   中英

Debian - htacces 404 not found 在此服务器上找不到请求的 URL

[英]Debian - htacces 404 not found The requested URL was not found on this server

我在 wamp 上开发了一个完美运行的网站(包括 .htaccess)。

所以我在 debian 服务器上部署了该站点,但出现以下错误:

404 Not Found - 在此服务器上找不到请求的 URL。

这是我的文件的内容:

#Options FollowSymLinks
RewriteEngine on
RewriteRule ^([a-zA-Z\_\-]+)/([a-z0-9_\-]+)/?$ index.php?page=$1&param=$2 [QSA]
RewriteRule ^([a-zA-Z\_\-]+)/?$ index.php?page=$1 [QSA]

所有文件都属于用户www-data rewrite module已启用。

谢谢。

在您的 apache 配置中。

在虚拟主机或默认配置上,您必须AllowOverride到您的域或文件夹。

<Directory "/">
    AllowOverride ALL
</Directory>

如果您无法覆盖您的 .htaccess 将无法工作,并且如果您无法重写您正在访问的 url 不存在,您将收到 404 错误。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM