2014-01-28 38 views
0

我正在面臨支付網關cc大道的問題。我需要更改URL,而不特別包機如何使用htacess刪除index.php?route =在url中使用htacess

我httaccess文件

RewriteBase/

RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L] 

RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L] 

RewriteRule ^download/(.*) /index.php?route=error/not_found [L] 

RewriteCond %{REQUEST_FILENAME} !-f 

RewriteCond %{REQUEST_FILENAME} !-d 

RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) 

RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] 

可以在任何一個可以幫助我

+0

什麼是您所遇到的問題? – anubhava

+0

主要問題是我在網站中安裝了ccavenue網關。但cc大道不接受我的網址,因爲它包含特殊的章程 – user3243345

+0

這些特殊字符的URL究竟是什麼。你能提供一些例子嗎? – anubhava

回答

0

你的意思是這樣的?

RewriteCond %{THE_REQUEST} \ /+index\.php\?_route_=([^\ &]+) 
RewriteRule^/%1? [L,R] 
+0

主要問題是我在網站安裝了ccavenue網關。但cc大街不接受我的網址,因爲它包含特殊的章程 – user3243345

0

@喬恩林

感謝您的回答。其工作形式如此;

RewriteBase/
 
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L] 
 
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L] 
 
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L] 
 
RewriteCond %{REQUEST_FILENAME} !-f 
 
RewriteCond %{REQUEST_FILENAME} !-d 
 
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) 
 
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] 
 
RewriteCond %{THE_REQUEST} \ /+index\.php\?_route_=([^\ &]+) 
 
RewriteRule^/%1? [L,R] 
 
RewriteCond %{HTTP_HOST} !^www\. 
 
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] 
 
RewriteCond %{SERVER_PORT} 80 
 
RewriteRule ^(.*)$ https://www.sitenamehere.net/$1 [R,L]