2014-01-28 40 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]