网站搭建完成了,进入登录界面就是访问不了。

原因大概是没有开启Apache mod_rewrite模块,或者没有配置完全。

步骤1:

启用mod_rewrite模块
在conf目录的httpd.conf文件中找到

LoadModule rewrite_module modules/mod_rewrite.so

将这一行前面的#去掉。

步骤2:

<Directory "/var/www/myweb">

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks #
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All #
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all </Directory>

步骤3:

重新启动apache

service httpd restart

如此便可以访问了页面了,.htaccess文件在所有的子页面都有效了。

404Not Found问题解决了。

最新文章

  1. iOS开发——高级技术精选OC篇&amp;Runtime之字典转模型实战
  2. Codeforces Round #336 (Div. 2)
  3. css之clear属性
  4. 初学者的checklist:对于QTP,你应该知道的9个基本概念
  5. 003-python列表
  6. jQuery慢慢啃之属性(三)
  7. BZOJ 1492 货币兑换
  8. web前端之 CSS引入第三方插件
  9. ( function(){…} )()
  10. (转)Spring boot——logback.xml 配置详解(三)&lt;appender&gt;
  11. TensorFlow简易学习[1]:基本概念和操作示例
  12. 第15章-输入/输出 --- File类
  13. PHP入门小练习
  14. python 线程(一)理论部分
  15. 关于linux中的 秘钥认证 ,最清晰解读
  16. Python学习(三十三)—— Django之ORM
  17. jquery网页日历显示控件calendar3.1使用详解
  18. android toolbar使用记录
  19. js中采用词法作用域
  20. SkylineGlobe 如何实现二次开发加载KML文件

热门文章

  1. crontab定时执行任务
  2. LVS+Keepalived实现MySQL从库读操作负载均衡
  3. 配置本地yum源的方法
  4. CentOS6.3 Firefox安装FlashPlayer
  5. jdbc01
  6. github修改自己的昵称
  7. Lua 基础知识-面向对象
  8. Mysql 视图笔记2
  9. 多线程12-CyclicBarrier、CountDownLatch、Exchanger
  10. javascript中的screen对象