How to use the rewrite rule to enable a redirection?
I have this set of rewrite rules:
########## 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开发者_StackOverflow社区 %{HTTP_HOST} ^www.drheliodias.com$
RewriteRule ^arquivos$ "http\:\/\/www\.4shared\.com\/dir\/PsKX6Kkn\/_online\.html" [R=301,L]
As the comments suggests, I'm using Joomla and I access my homepage by http://www.drheliodias.com which works perfectly. Although, I want http://www.drheliodias/arquivos to redirect to my 4shared virtual folder as I did it with cPanel. I checked my .htaccess file and this redirection was there indeed (as seen in the last line) but as soons as I type http://www.drheliodias/arquivos my joomla says this page doesn't exist. How do I fix it?
Just put this line before the Joomla section, right after "RewriteEngine On" directive:
RedirectMatch 303 ^arquivos$ http://www.4shared.com/dir/PsKX6Kkn/_online.html
精彩评论