我的vhost:
Options +Indexes +FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
htaccess的:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteBase /
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)/([^/]*)$ /?id=$1&v=$2 [L]
</IfModule>
我的网址看起来像这样
http://hatchpass.local/?id=fbb43&v=minimal
在Apache中启用了mod_rewrite并且我已经确认它是加载,但是,当我尝试像http://hatchpass.local/fbb43这样的东西时,我得到了404。
思想?
答案 0 :(得分:0)
RewriteRule
中的正则表达式与foo/bar
匹配。 URL(“http://hatchpass.local/fbb43”)不适用于此。它只是作为“fbb43”传入。