2013-12-17 36 views
1

你好我試圖重定向: http://example.com/sz/QUERY到: http://differentsite.com/?q=sea:r.ch QUERYhtaccess的重定向到不同的網站與查詢

我有在上面的鏈接添加空間的麻煩......

這裏是我到目前爲止在root/sz/

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ http://differentsite.com/?q=sea:r.ch%20$1 [L,QSA] 

任何幫助,將不勝感激。

回答

1

您可以使用此規則:

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^sz/(.+)$ "http://differentsite.com/?q=sea:r.ch $1" [L,QSA,NE,R]