Home > Backend Development > PHP Tutorial > yii redirect, eliminate index.php_PHP tutorial

yii redirect, eliminate index.php_PHP tutorial

WBOY
Release: 2016-07-20 11:17:56
Original
1103 people have browsed it

Add .htaccess under the project

The content is as follows:

deny from all

Options -Indexes

Options +FollowSymLinks

# 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]

In the above content

/hangman/index.php after RewriteRule should be filled in according to the actual situation

It took me a long time to experiment before I succeeded. One night I suddenly had inspiration. Although the inspiration failed, it inadvertently opened up another path

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/371908.htmlTechArticleAdd .htaccess under the project with the following content: Files .htaccess deny from all /Files Options -Indexes Options +FollowSymLinks IfModule mod_rewrite.c # For security reasons, Option foll...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template