【发布时间】:2012-07-15 02:04:31
【问题描述】:
我正在尝试让 htaccess 文件重定向。这样当 URL 为-http://mobile.domain.tld/index.php?page=home
Apache 实际请求http://mobile.domain.tld/index.php?page=home&template=mobile
我现在拥有的是-
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^mobile\.domain\.tld\/index\.php?page=(.+)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^index.php?page=(.+)$ index\.php?page=$1&template=mobile [QSA,L]
手机。子域指向 public_html,但目前似乎没有附加“&template=mobile”参数。
任何想法将不胜感激。
【问题讨论】:
-
谁能回答我关于 htaccess 移动重定向的问题。 stackoverflow.com/questions/15178278/…