【发布时间】:2017-03-12 17:38:39
【问题描述】:
我想将blog.byperte.com/blog/article 重定向到blog.byperte.com/article。该博客基于 Anchor CMS 构建,具有以下 .htaccess 文件:
Options -indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 index.php
</IfModule>
【问题讨论】:
-
您是否有通过 URL (blog.byperte.com/blog/article) 发送的参数,例如文章 ID 或标题?
-
我想是的。 PHP 不是我的强项。
标签: php .htaccess web anchor-cms