1
我需要重寫規則的多個參數如下幫助:多個參數友好的URL重寫規則
sitename.com/project.php?t=value1&a=value2
成爲
sitename.com/project/value2/value1
但不知何故,我無法解決的問題,並表示500 Internal Server Error
我的htaccess文件:
DirectoryIndex index.php
Options -Indexes
<Files *htaccess>
Deny from all
</Files>
<files page>
ForceType application/x-httpd-php
</files>
<IfModule mod_rewrite.c>
Options +SymLinksIfOwnerMatch
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
#resolve .php file for extensionless php urls
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [L]
RewriteRule ^cp/edit-agent/([^/\.]+)/?$ cp/edit-agent.php?name=$1 [L]
RewriteRule ^([^/\.]+)/?$ agent.php?name=$1 [L]
#rule to handle example.com/123/sys
RewriteRule ^project/([0-9]+)/([^/\.]+)/?$ project.php?a=$1&t=$2 [L,QSA]
</IfModule>
請幫忙。