PHP MVC フレームワークをセットアップしていて、ドメインの後に何かを index.php/$1 にリダイレクトしたいのですが、うまくいきません。rewrite_module を有効にし、AllowOverride All を使用していますが、他に不足しているものはありますか?
基本的に、URLをここからに移動しhttp://www.example.com/foo/bar
てhttp://www.example.com/index.php/foo/bar
、 $_SERVER['PATH_INFO'] から取得できるようにします
これが私が持っているものです...
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [L]
httpd-vhosts.conf
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot c:/wamp/www
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/websites/snugglemvc"
ServerName www.snugglemvc.com
<Directory "c:/websites/snugglemvc">
Order Deny,Allow
Allow from all
AllowOverride all
</Directory>
</VirtualHost>