Thinkphp 隐藏 index.php 方法
2012-11-01 19:52
701 查看
方法一
https.ini 中
#
# 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 原来是 none 变为 All
AllowOverride All
建议在虚拟目录中设置
<VirtualHost 127.0.0.1:80>
ServerAdmin admin@163.com
DocumentRoot "D:/www/CarShop"
ServerName www.huifw.com
ServerAlias huifw.com
<Directory "D:\WWW">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
------------------------------------------------------------------------------------------------------------
config.php 中
'URL_MODEL' => 2 ,
------------------------------------------------------------------------------------------------------------
在根目录下面 建立 .htaccess 一定要有 点 ,可以cmd下起名,或是另存为
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
------------------------------------------------------------------------------------------------------------
https.ini 中
#
# 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 原来是 none 变为 All
AllowOverride All
建议在虚拟目录中设置
<VirtualHost 127.0.0.1:80>
ServerAdmin admin@163.com
DocumentRoot "D:/www/CarShop"
ServerName www.huifw.com
ServerAlias huifw.com
<Directory "D:\WWW">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
------------------------------------------------------------------------------------------------------------
config.php 中
'URL_MODEL' => 2 ,
------------------------------------------------------------------------------------------------------------
在根目录下面 建立 .htaccess 一定要有 点 ,可以cmd下起名,或是另存为
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
------------------------------------------------------------------------------------------------------------
相关文章推荐
- thinkphp隐藏index.php/home并允许访问其他模块的实现方法
- thinkphp隐藏index.php/home并允许访问其他模块的实现方法
- thinkphp5 隐藏index.php方法
- thinkphp3.2 隐藏Home模块及index.php入口文件的方法
- thinkPHP隐藏url地址栏中的index.php方法
- thinkphp5 IIS7.5 隐藏index.php的方法
- ThinkPHP隐藏index.php出现No input file specified的解决方法
- Nginx服务器下ThinkPHP5访问出现404以及URL隐藏index.php
- thinkphp 隐藏index.php
- 关于ThinkPHP隐藏index.php
- Thinkphp3.2 伪静态以及thinphp3.2去掉index.php方法
- thinkphp报错No input file specified. (对于隐藏url中的index.php 是如何做到的?)
- Ubuntu-server 下Apache2 配置.htaccess 隐藏thinkPHP项目index.php
- ThinkPHP5 隐藏接口里面的index.php
- thinkphp5配置隐藏index.php
- 隐藏CI框架路径中的index.php方法
- Yii隐藏URL中index.php的方法
- 关于ThinkPHP5.0在Apache下隐藏index.php报错的问题
- 在SAE上真正隐藏index.php的方法
- ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php