我的access切期望:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?site.com [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/.]+)/?$ index.php?page=$1
RewriteRule ^([^/.]+)/([^/.]+)?$ index.php?page=$1&subsectie=$2
RewriteRule ^([^/.]+)/([^/.]+)/([^/.]+)?$ index.php?page=$1&subsectie=$2&subid=$3
I ve edited the htaccess file. 它只应在主要领域,而不是在子域使用这一通道,但次域仍使用这一通道。
具有比我更丰富经验的任何人,都可以在正确方向指出? 提前感谢。
Edit: Here is my current (and working) htaccess:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$ [NC]
RewriteRule ^([^/.]+)/?$ index.php?page=$1
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$ [NC]
RewriteRule ^([^/.]+)/([^/.]+)?$ index.php?page=$1&subsectie=$2
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$ [NC]
RewriteRule ^([^/.]+)/([^/.]+)/([^/.]+)?$ index.php?page=$1&subsectie=$2&subid=$3