YII2 隐藏index
来源:互联网 发布:面向对象编程步骤 编辑:程序博客网 时间:2024/06/16 09:51
Please add the following lines in ‘.htaccess’ file inside the ‘web’ directory of yii2.0 application.
在YII front /web 下面建立 .htaccess 在cmd 里面找到路径: echo>.htaccess
RewriteEngine on# If a directory or a file exists, use it directlyRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-d# Otherwise forward it to index.phpRewriteRule . index.php
在: main.php 文件里面写入:
.................'urlManager' => ['class' => 'yii\web\UrlManager',// Disable index.php'showScriptName' => false,// Disable r= routes'enablePrettyUrl' => true,'rules' => array(),],.................
||||||||||||||||||
或者:在APACHE 里面:
<VirtualHost *:80>DocumentRoot "E:/xampp/htdocs/test.dev/frontend/web"ServerName test.dev<Directory "E:/xampp/htdocs/test.dev/frontend/web">Options Indexes FollowSymLinks Includes ExecCGIAllowOverride AllOrder allow,denyAllow from all#RewriteEngine on#RewriteCond %{REQUEST_FILENAME} !-f#RewriteCond %{REQUEST_FILENAME} !-d#RewriteRule . index.php# DirectoryIndex index.php #####加入 # 号部份</Directory></VirtualHost>
0 0
- YII2 隐藏index
- Yii2简单地址美化并隐藏index.php
- Yii2简单地址美化并隐藏index.php
- YII2 URL美化以及隐藏入口文件index.php
- Yii2的高级应用程序模板中设置隐藏 index.php 步骤
- yii 隐藏index.php
- Yii隐藏index.php
- YII隐藏index.php
- ci 隐藏index.php
- thinkphp 隐藏index.php
- 6. 隐藏 index.php
- 隐藏URL中的index
- think隐藏index.php
- nginx 隐藏index.php
- tp5隐藏index.php
- Yii2源码分析(1)-- index.php
- Thinkphp 隐藏 index.php 方法
- YII隐藏index入口文件
- 给Java程序猿们推荐一些值得一看的好书
- OkHttp与Cookie及Cookie的持久化
- 2015-2016 ACM-ICPC, NEERC, Moscow Subregional Contest A
- Android Studio项目与Eclipse+ADT 项目之间的相互转换
- InstallShield 用法
- YII2 隐藏index
- 为什么你要使用java8
- ajax对xml和json语言的解析
- 使用jQuery实现图片自动轮播
- 新一代树莓派 Raspberry Pi 2 性能测试之软件无线电追踪飞机信息
- tjut 2795
- Codeforces 185 A Plant
- phpstorm 与 xdebug
- 调用系统相机