0
以下是我的.htaccess
文件。。5個變量的htaccess問題
AddDefaultCharset utf-8
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .* - [L]
DirectoryIndex index.php
RewriteRule ^([a-zA-Z0-9_-]{3,20})/([^/]+)/([^/]+)?$ index\.php?page=$1&s=$2&o=$3&p=$4&q=$5 [L]
RewriteRule ^([a-zA-Z0-9_-]{3,20})/([^/]+)/([^/]+)?$ index\.php?page=$1&s=$2&o=$3&p=$4 [L]
RewriteRule ^([a-zA-Z0-9_-]{3,20})/([^/]+)/([^/]+)?$ index\.php?page=$1&s=$2&o=$3 [L]
RewriteRule ^([a-zA-Z0-9_-]{3,20})/([^/]+)?$ index\.php?page=$1&s=$2 [L]
RewriteRule ^([a-zA-Z0-9_-]{3,20})/?$ index\.php?page=$1 [L]
RewriteRule ^([a-zA-Z0-9_-]{3,20})?$ index\.php?page=$1 [L]
ErrorDocument 404 /404
當我這樣做
ehco "<pre>";
print_r($_REQUEST);
echo "</pre>";
有3個參數,它顯示我
Array
(
[page] => test
[s] => 1
[o] => 9
[p] =>
[q] =>
)
但如果超過3個參數,它說沒有找到。 的.htaccess
在以下網址做工精細 爲myhost/mysite的/網頁/ S/O 而不是 爲myhost /頁/ S/O/P
你的意思是下面添加這些第3行e第一重寫規則? – baig772
編輯,現在列出的洞代碼 –
耶謝謝,它工作:) – baig772