展会信息港展会大全

yii重定向,消除index.php
来源:互联网   发布日期:2016-03-02 15:40:50   浏览:2591次  

导读:在项目下添加.htaccess内容如下:<Files .htaccess>deny from all</Files>Options -IndexesOptions +FollowSym...

在项目下添加.htaccess

内容如下:

<Files .htaccess>

deny from all

</Files>

Options -Indexes

Options +FollowSymLinks

<IfModule mod_rewrite.c>

# For security reasons, Option followsymlinks cannot be overridden.

# Options +FollowSymLinks

# Options +SymLinksIfOwnerMatch

# IndexIgnore */*

RewriteEngine on

# if a directory or a file exists, use it directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php

RewriteRule ^(.*)$ /hangman/index.php [L]

</IfModule>

以上内容中

RewriteRule 后面的 /hangman/index.php 应根据实际填写

试验了好久才成功得,有一天晚上突然有灵感,虽然灵感失败了,但是无意中打开了 另一条道路

赞助本站

人工智能实验室

相关热词: 开发 编程 android

AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港