Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess 如何使用重写规则启用重定向?_.htaccess_Joomla_Url Rewriting - Fatal编程技术网

.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