Apache重写模块:规则详解
2014-12-17 10:57
351 查看
1,开其重写模块:
sudo a2enmod rewrite
2,配置为可重写:
打开 /etc/apache
< Directory />
Options FollowSymLinks
AllowOverride All
< /Directory>
在项目目录下,新建 .htaccess文件,加入以下内容:
3,重写规则:
sudo a2enmod rewrite
2,配置为可重写:
打开 /etc/apache
< Directory />
Options FollowSymLinks
AllowOverride All
< /Directory>
在项目目录下,新建 .htaccess文件,加入以下内容:
<IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On RewriteBase / #重写条件 RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f #重写规则 RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] </IfModule>
3,重写规则:
相关文章推荐
- apache重写规则详解
- apache重写规则详解
- Apache模块详解-mod_rewrite重写模块
- apache重写规则详解
- apache重写规则详解
- thinkphp路由规则使用示例详解和伪静态功能实现(apache重写)
- Apache Rewrite 规则详解
- Apache Rewrite 的重写规则
- RewriteRule重写规则的语法:Apache的Mod_rewrite
- Apache 重写规则的常见应用 (rewrite)
- Apache的rewrite模块(url重写模块)配置
- Apache Rewrite 规则详解(二)
- Apache Rewrite Rule 重写规则
- Apache mod_rewrite规则重写的标志一览
- apache 编译重写模块
- Apache Rewrite 规则详解
- Apache的Mod_rewrite学习 (RewriteCond重写规则的条件)
- Apache Rewrite 规则详解
- Apache的Mod_rewrite学习(RewriteRule重写规则的语法)