apache服务器开启rewrite模式总结 解决404错误
2013-04-26 14:52
501 查看
通过比对本地wampserver的配置文件和服务器上的apache配置文件,解决了404错误
1:进入apache目录的conf目录
2:打开httpd.conf
3:找到#LoadModule rewrite_module modules/mod_rewrite.so然后把前面的#去掉
4:找到所有的AllowOverride配置项,把所有的None都修改为All
5:在网站根目录下面新建一个 .htaccess 文件(什么?这个文件不会添加?先新建一个txt,然后另存为 .htaccess文件就行),输入一下内容
6:重启apache
1:进入apache目录的conf目录
2:打开httpd.conf
3:找到#LoadModule rewrite_module modules/mod_rewrite.so然后把前面的#去掉
4:找到所有的AllowOverride配置项,把所有的None都修改为All
5:在网站根目录下面新建一个 .htaccess 文件(什么?这个文件不会添加?先新建一个txt,然后另存为 .htaccess文件就行),输入一下内容
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] </IfModule>
6:重启apache
相关文章推荐
- apache服务器开启rewrite模式总结 解决404错误
- apache服务器开启rewrite模式总结 解决404错误
- apache服务器开启rewrite模式总结 解决404错误
- apache服务器开启rewrite模式总结 解决404错误
- apache/httpd 服务器开启rewrite模式总结 解决404错误
- apache服务器开启rewrite模式(隐藏index.php)
- linux&nbsp;apache&nbsp;服务器开启rewrite&nbsp;…
- AIX5.3服务器主备模式解决内存耗尽总结
- 一台主机利用apache服务器开启虚拟主机后无法使用www域名解决方法
- [置顶] ThinkPHP部署在IIS,Apache服务器上的rewrite模式的配置文件
- macOS apache配置及开启虚拟服务器的开启,apache开启重写模式
- MyEclipse开启Tomcat服务器时总是进入Debug模式的解决
- 关于apache开启rewrite模式后对URL解析测试
- ubuntu 下开启 apache 的 rewrite 模式
- ubuntu开启服务器调试模式及smarty没法编译文件解决方法
- Apache服务器出现Forbidden 403错误提示的解决方法总结
- apache服务器开启rewrite以及使用rewrite将thinkphp的url中index.php消除
- apache开启vhost后,适应ThinkPHP的rewrite模式
- apache开启rewrite路径重写模式
- centos 开启apache rewrite模式