Ubuntu-server 下Apache2 配置.htaccess 隐藏thinkPHP项目index.php
来源:互联网 发布:php自动跳转页面 编辑:程序博客网 时间:2024/06/05 20:00
转载自http://www.cnblogs.com/libertycode/p/5935761.html
需要开启Apache2的rewrite模块
1、打开/etc/apache2/apache2.conf
将文件中的AllowOverride None改为AllowOverride All
2、修改mods-enable配置,添加一个软件链接
cd /etc/apache2/mods-enableln -s ../mods-avaiable/rewrite.load rewrite.load
3、在项目根目录下添加.htaccess文件,修改rewrite规则
<IfModule mod_rewrite.c>RewriteEngine on#不显示index.phpRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]</IfModule>
4、重启服务器
service apache2 restart
0 0
- Ubuntu-server 下Apache2 配置.htaccess 隐藏thinkPHP项目index.php
- Ubuntu-server 下Apache2 配置.htaccess 隐藏thinkPHP项目index.php无效解决办法
- Ubuntu Apache2 配置.htaccess 隐藏thinkPHP项目index.php无效正确解决办法!!!!!!
- 配置thinkphp路由,隐藏index.php
- thinkphp 隐藏index.php
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php
- ubuntu apache下设置隐藏index.php
- 在htaccess文件中隐藏index.php
- Thinkphp 隐藏 index.php 方法
- bae+ThinkPHP隐藏index.php
- thinkphp隐藏Index.php入口
- 关于ThinkPHP隐藏index.php
- thinkPHP Apache 优化url,隐藏index.php所需配置
- Debian8环境下thinkphp框架隐藏index.php
- UNIX新手-常用命令笔记
- 为镜像img改密码
- hdu2586 How far away? Tarjan(离线)算法求最近公共祖先LCA 待补完
- PAT测试1001 害死人不偿命的(3n+1)猜想 java实现
- Hive基本使用——命令行
- Ubuntu-server 下Apache2 配置.htaccess 隐藏thinkPHP项目index.php
- 易语言使用LhSocket5Net创建Socket5服务器
- 学习笔记
- 106. Construct Binary Tree from Inorder and Postorder Traversal
- 百度笔试--计算机视觉算法工程师
- 279. Perfect Squares
- (新规)最高法、最高检、公安部《关于电子数据收集提取判断的规定》(2016年10月1日施行)
- Android Studio鼠标悬停显示注释
- 形参个数可变的方法