【发布时间】:2014-06-04 21:15:13
【问题描述】:
我的目标是将 http://example.com/c/themeforest/wordpress 之类的 URL 重定向到 PHP http://example.com/?params=c/themeforest/wordpress。
为此,我使用了一个包含以下内容的 .htaccess 文件:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?params=$1 [NC]
但现在我还必须能够重定向像 http://example.com/c/themeforest/wordpress?p=2 这样的 URL
多个页面发送至http://example.com/?params=c/themeforest/wordpress&p=2。
页码必须在单独的 PHP GET 变量中发送。
【问题讨论】: