0
htaccessルールに問題があります。動作していないためです。私はすでにGoogle上の任意のソリューションを見つけることを試みるがまだまだ見つけられていない。 コードは次のとおりです。.htaccess複数のパラメータが動作していない[sloved]
RewriteEngine ON
RewriteBase /deshop/
RewriteCond %{REQUEST_URI} ^/deshop/admin(.+)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ admin/index.php [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)$ index.php?p=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)/([^\s]+)$ index.php?p=$1&b=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)/([0-9]+)$ index.php?p=$1&id=$2 [L]
URLが正常に動作している:
http://localhost/deshop/index.php to http://localhost/deshop/ -> home page from folder
http://localhost/deshop/admin/index.php to http://localhost/deshop/admin/ -> admin page from subfolder
http://localhost/deshop/index.php?p=tshirts to http://localhost/deshop/tshirts/
http://localhost/deshop/index.php?p=brand&b=John%20Player to http://localhost/deshop/brand/John-Player/
だから起こり、最後のルールが動作しません。
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)/([0-9]+)$ index.php?p=$1&id=$2 [L]
しかし最後のルールはまだ機能していません。私は本当に難しい。私はパラメータでURLを取得したいので、作品を見て:
http://localhost/deshop/index.php?p=single&id=0005 to http://localhost/deshop/single/0005
それとも、私が間違って何ですか?どんな解決策ですか?手伝って頂けますか?どうもありがとう。ところで、私の英語は良くありません。ごめんなさい!