【发布时间】:2011-05-20 16:09:07
【问题描述】:
任何人都知道要在 vhost.conf 中放入什么以供 apache 复制(来自 .htaccess):
RewriteEngine on
RewriteCond $1 !^(index\.php|images|scripts|css|uploads|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
基本上,我希望除 /images、/scripts 或 /css 之外的所有请求都通过 /index.php。
当我使用 .htaccess 文件时它可以工作,但我也想知道如何通过 vhost.conf 来做。任何人都知道在性能、稳定性等方面是否也使用一个比另一个更好(vhost.conf vs htaccess)?
【问题讨论】:
-
您应该能够将 1:1 放入 VirtualHost 指令中
标签: apache .htaccess mod-rewrite virtualhost