アイデア:私はそれを作りたいドメイン名の後に来るとの.htmlで終わるものがあるindex.phpでGET変数として扱われていること問題
例:www.test.ro/1/2/3.html
実際にはwww.test.ro/index.php?var=1/2/3.html
である必要があります。
www.test.ro
は、開発用の仮想ホストとして設定され、AllowOverride
の値はすべてです。
.htaccessファイルが処理されているように見えますが、すべてではありません。 'BizzareRule'のような認識されないルールを書くと、サーバーはコード500のエラーを返さずに動作します。 <IfModule mod_rewrite.c></IfModule>
の間に正しいルールを置くと、同じ条件で完全に動作する他の仮想ホストがあるにもかかわらず、500エラーが発生します。ここで
は私のバーチャルホストの内容は以下のとおりです。
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName www.test.ro
ServerAlias test.ro
DocumentRoot D:/Projects/grabsite/test.ro
Options Indexes FollowSymLinks MultiViews
DirectoryIndex index.php index.html
LogLevel warn
ErrorLog D:/Projects/grabsite/test.ro/error.log
CustomLog D:/Projects/grabsite/test.ro/access.log combined
<Directory "D:/Projects/grabsite/test.ro">
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
と.htaccessのためのテスト内容:
RewriteEngine On
RewriteRule ^/?([^/]*)\.html$ /index.php?seo=$1 [L]