Apache pseudo-static setting redirects all access directories or files to index.php, but it is invalid when accessing the directory? ? ?

WBOY
Release: 2016-08-08 09:06:37
Original
2750 people have browsed it

The rewriting rules are as follows:

<code> RewriteEngine On
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^(.*)$ index.php [QSA,PT,L]</code>
Copy after login
Copy after login

For example:

If the accessed directory does not exist or when accessing a file, it can be redirected normally
Apache pseudo-static setting redirects all access directories or files to index.php, but it is invalid when accessing the directory? ? ?

If you access an existing directory

Apache pseudo-static setting redirects all access directories or files to index.php, but it is invalid when accessing the directory? ? ?

I don’t know how to redirect the access directory to the index.php file? ?

Reply content:

The rewriting rules are as follows:

<code> RewriteEngine On
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^(.*)$ index.php [QSA,PT,L]</code>
Copy after login
Copy after login

For example:

If the accessed directory does not exist or when accessing a file, it can be redirected normally
Apache pseudo-static setting redirects all access directories or files to index.php, but it is invalid when accessing the directory? ? ?

If you access an existing directory

Apache pseudo-static setting redirects all access directories or files to index.php, but it is invalid when accessing the directory? ? ?

I don’t know how to redirect the access directory to the index.php file? ?

Turn off display directory in configuration

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!