2012-10-24 78 views
1

以下部分寫入到我的.htaccess文件中。我正在使用ZenCart「CEON URI映射」模塊。我遇到問題,因爲PHP腳本的一部分會查找某個變量,並在找到時顯示一個CSS顯示框。使用.htaccess不重寫具有特定GET參數的URL。

我需要做的是讓htaccess在設置時不重寫URL的「amznPmtsOrderIds」GET參數。

我將如何將此主題融入了以下內容:

# BEGIN CEON URI MAPPING 
# Don't rewrite any URIs ending with a file extension (ending with .[xxxxx]) 
RewriteCond %{REQUEST_URI} !\.[a-z]{2,5}$ [NC] 
# Don't rewrite admin directory 
RewriteCond %{REQUEST_URI} !^/admin [NC] 
# Don't rewrite editors directory 
RewriteCond %{REQUEST_URI} !^/editors [NC] 
# Don't rewrite cPanel directories 
RewriteCond %{REQUEST_URI} !/cpanel [NC] 
RewriteCond %{REQUEST_URI} !/frontend [NC] 
RewriteCond %{REQUEST_URI} !\.mp4$ [NC] 
RewriteCond %{REQUEST_URI} !/livehelp.*$ [NC] 
RewriteCond %{REQUEST_URI} !/rest.php/ 
RewriteCond %{REQUEST_URI} !/restInterface\.php.*$ 
# Handle all other URIs using Zen Cart (index.php) 
RewriteRule .* index.php?%{QUERY_STRING} [L] 
# END CEON URI MAPPING 

感謝您的幫助。

回答

1

此行之前立即...

# Handle all other URIs using Zen Cart (index.php) 

...補充一點:

# Don't rewrite any URIs with a "amznPmtsOrderIds" GET parameter 
RewriteCond %{QUERY_STRING} !amznPmtsOrderIds [NC]