2011-07-13 63 views
0

我有这个设置的重写规则:如何使用重写规则启用重定向?

########## Begin - Joomla! core SEF Section 
# 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_URI} !^/index.php 
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC] 
RewriteRule (.*) index.php 
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] 
# 
########## End - Joomla! core SEF Section 
RewriteCond %{HTTP_HOST} ^drheliodias.com$ [OR] 
RewriteCond %{HTTP_HOST} ^www.drheliodias.com$ 
RewriteRule ^arquivos$ "http\:\/\/www\.4shared\.com\/dir\/PsKX6Kkn\/_online\.html" [R=301,L] 

正如评论指出,我使用Joomla和我通过http://www.drheliodias.com这完美的作品访问我的主页。虽然,我想http://www.drheliodias/arquivos重定向到我的4shared虚拟文件夹就像我用cPanel做的那样。我检查了我的.htaccess文件,并且这个重定向确实存在(如最后一行所示),但是如我输入http://www.drheliodias/arquivos那样,我的joomla说这个页面不存在。我如何解决它?

回答

0

只是把这个线的Joomla部分之前,之后 “RewriteEngine叙述在” 指令:

RedirectMatch 303 ^arquivos$ http://www.4shared.com/dir/PsKX6Kkn/_online.html