1、隐藏根目录下 index.php, 在根目录下创建 .htaccess文件

内容如下:

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

<IfModule mod_rewrite.c>

    RewriteEngine on

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]

</IfModule>

2、CI框架 将后台程序放在application下的admin子文件夹下  不能访问图片、css等解决办法

在application目录下创建.htaccess 

内容如下:

<IfModule authz_core_module>

    Require all denied

    <FilesMatch "\.(images|js|css|jpeg|png|csv|gif)$">   //这下结尾的文件 可以访问

        Require all granted

    </FilesMatch>

</IfModule>

 

<IfModule !authz_core_module>

    Deny from all

</IfModule>

 

 

 

 

<IfModule authz_core_module>    Require all denied    <FilesMatch "\.(images|js|css|jpeg|png|csv|gif)$">        Require all granted    </FilesMatch></IfModule>
<IfModule !authz_core_module>    Deny from all</IfModule>

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄