.htaccess 如何使用重写规则启用重定向?
我有一套重写规则:.htaccess 如何使用重写规则启用重定向?,.htaccess,joomla,url-rewriting,.htaccess,Joomla,Url Rewriting,我有一套重写规则: ########## 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]
########## 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,我可以通过它访问我的主页,它可以完美地工作。尽管如此,我还是想重定向到我的4shared虚拟文件夹,就像我用cPanel做的那样。我检查了我的.htaccess文件,这个重定向确实在那里,正如在最后一行中看到的,但只要我键入我的joomla就说这个页面不存在。如何修复它?只需将这一行放在Joomla部分之前,就在Joomla部分之后 重写引擎On指令:
RedirectMatch 303 ^arquivos$ http://www.4shared.com/dir/PsKX6Kkn/_online.html