VPS侦探论坛

 找回密码
 注册
查看: 4342|回复: 3
打印 上一主题 下一主题

.htaccess 放网站根目录无效,请教下军哥怎么解决

[复制链接]
跳转到指定楼层
1#
发表于 2019-4-23 10:44:55 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

我弄了个.htaccess 放网站根目录下,可是不起作用,请问怎么解决呢?谢谢

美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
2#
 楼主| 发表于 2019-4-23 11:38:13 | 只看该作者


RewriteEngine On

# If requested resource exists as a file or directory, skip next two rules
RewriteCond %{DOCUMENT_ROOT}/$1 -f [OR]
RewriteCond %{DOCUMENT_ROOT}/$1 -d
RewriteRule (.*) - [S=2]
#
# Else rewrite requests for non-existent resources to /index.php
RewriteRule (.*) /index.php?q=$1 [L]

上面是我的htaccess 规则
显示错误
unknown directive "RewriteEngine On" in /home/wwwroot/www.mysite.COM/.htaccess:4
unknown directive "RewriteCond" in /home/wwwroot/www.mysite.COM/.htaccess:4

请教下,谢谢了
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
3#
发表于 2019-4-23 13:01:09 | 只看该作者

apache是apache的,nginx是nginx 两者伪静态是完全不一样不通用
官网 https://lnmp.org 常见问题有说明
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
4#
 楼主| 发表于 2019-4-23 21:11:01 | 只看该作者



licess 发表于 2019-4-23 13:01
apache是apache的,nginx是nginx 两者伪静态是完全不一样不通用
官网 https://lnmp.org 常见问题有说明 ...

谢谢,已解决
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2026-2-11 19:45 , Processed in 0.143981 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表