zoukankan      html  css  js  c++  java
  • 新部署到服务器 报 The requested URL /home/profession was not found on this server. 错误

    The requested URL /home/profession was not found on this server.

    通过xxx.com, 首页可以正常访问,xxx.com/xx/xx 就出现 The requested URL xxx was not found on this server.

    1,找到apache配置文件httpd.conf配置文件中的

    AllowOverride none        
    Require all denied

    改成

    Options Indexes FollowSymLinks    
    AllowOverride All

    2,找到apache配置文件httpd.conf配置并开启重写模块

    LoadModule rewrite_module modules/mod_rewrite.so 

    Ubuntu16.04模块在  /etc/apache2/mods-available 下,需要链接到  mods-enable 下

    ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load

     3.加在重写,站点缺少 .htaccess 文件(文件在public下,没有就新建)

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
  • 相关阅读:
    浪潮之巅阅读笔记01
    2018年春季个人阅读计划
    问题账户需求分析
    需求工程解析图收获
    《软件需求分析》阅读笔记
    《软件需求》阅读笔记之三
    《小账本》开发日志 第六天
    《小账本》开发日志 第五天
    [POI2009]KAM-Pebbles BZOJ1115 [ 待填坑 ] 博弈
    打谷机 BZOJ 1603 模拟
  • 原文地址:https://www.cnblogs.com/cap-rq/p/10891894.html
Copyright © 2011-2022 走看看