[英].htaccess rewriting with multiple $_GET variables
I'm really struggling to write my .htaccess file properly. 我真的很难正确地编写我的.htaccess文件。 I would like the following to happen:
我希望发生以下情况:
So far, I've managed to get as far as mentioned in the 1st point . 到目前为止,我已经达到了第一点所提到的范围。
But can't work out where to go next to achieve the 2nd point . 但是不能算出去达到第二点的下一步。
Do I need to write new lines for a separate rule, or amend the current lines? 我需要为单独的规则写新行还是修改当前行?
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{REQUEST_URI} !index\.php
RewriteCond %{HTTP_HOST} ^(.+?)\.domain\.com$
RewriteRule .* http://www.domain.com/index.php?id=%1 [L,P]
Any help appreciated. 任何帮助表示赞赏。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.