2

我正在尝试获取最后一个重写以获取 php 中的“lang”。但是,当我打开参数时,它会返回“index.php”。以下代码有什么问题?

Options +FollowSymlinks
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)/(.*) index.php?lang=$1&url=$2 [NC]
RewriteRule ^([^/]+)/home/([^/]+)/?$ index.php?lang=$1&voorpagina=$2 [NC]
4

1 回答 1

1

尝试[L]像这样添加标志:

Options +FollowSymlinks
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/home/([^/]+)/?$ index.php?lang=$1&voorpagina=$2 [NC,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/(.*) index.php?lang=$1&url=$2 [NC,L]
于 2012-11-15T14:52:38.457 回答