我的.htaccess文件中有8行重写规则。我需要从这些规则中排除服务器上的两个物理目录,以便可以访问它们。目前,所有请求都发送到index.php文件。因此http请求:不应该将传递给index.php文件。RewriteEngine On
RewriteCond %{HTTP_HOST} !.*)$
我已经设置了htaccess RewriteRules来重写,比如将"domain.ext/en/page"重写成"domain.ext?lang=en&p=page",这样就可以正常工作了。但是,我想让语言部分成为可选的,这样"domain.ext/page"也会重写成"domain.ext?lang=en&p=page"。lang=en
Re
将此mod_rewrite从.htaccess移动到apache2.conf后,$_SERVER['SCRIPT_NAME']和$_SERVER['PHP_SELF']返回的值与else不同。# point all requests to index.phpRewriteRule ^ /index.php [L,