私はphpでクリーンURLを作成しようとしていますが、エラーが発生します。誰かが助けてくれることを願っています。
私の.htaccessは次のとおりです。
# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php
# this is the initialization
# For security reasons, Option followsymlinks cannot be overridden.
#Options +FollowSymLinks
Options +SymLinksIfOwnerMatch
RewriteEngine On
RewriteBase /
# these are the rewrite conditions
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# and finally, the rewrite rules
RewriteRule ^([a-zA-Z0-9\-]+)/?$ /price/index.php?var1=$1 [L,QSA]
RewriteRule ^([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)/?$ /price/index.php?var1=$1&var2=$2 [L,QSA]
RewriteRule ^([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)/?$ /price/index.php?var1=$1&var2=$2&var3=$3 [L,QSA]
実際、私はサブフォルダーでクリーンなURLを作成しようとしていますprice/
。
私が入るとき:mydomain.com/price/param1
それは完璧に機能し、実際に私をにリダイレクトします
mydomain.com/price/index.php?var1=param1
しかし、より多くの変数を使用して前進しようとすると、問題が発生します。アクセスしようとするmydomain.com/price/param1/param2
とリダイレクトされず、404エラーが表示されます。
何か案が?前もって感謝します。