【发布时间】:2017-02-28 15:21:51
【问题描述】:
当我尝试继续 http://localhost/themobilesapp 时,它仍然会在 specification.php 页面上重定向我,而不是在 index.php 上重定向我
现在,我将通过键入 http://localhost/themobilesapp/index.php
进入我的主页这是我的完整 htaccess 代码。
Options +FollowSymLinks -MultiViews -Indexes
<IfModule mod_rewrite.c>
DirectoryIndex index.php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
ErrorDocument 404 404error.php
RewriteRule ^([A-Za-z0-9-]+)?$ specification.php?url=$1 [L]
RewriteRule ^news/([A-Za-z0-9-]+)?$ news.php?url=$1 [L]
</IfModule>
如何通过键入 http://localhost/themobilesapp 将其重定向到 index.php 上?
【问题讨论】: