Forum Moderators: phranque
RewriteRule ^Wakulla_News/Local_News/Wakulla_Outdoors/(.*)$ http://www.example.com/Wakulla_Outdoors/$1 [R=301,L] RewriteEngine On
RewriteBase /
DirectoryIndex index.php index.html
IndexIgnore *
Options -Indexes
###### Add trailing slash (optional) ######
RewriteCond %{REQUEST_URI} ^/[^\.]+[^/]$
RewriteRule ^(.*)$ $1/ [R=301,L]
###### external redirect from /index.php/foo to /foo ######
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+index\.php(/.+)?[\s\?] [NC]
RewriteRule ^ %1 [L,R=301]
##### Joomla! core SEF Section -- BEGIN
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|raw|ini|zip|json|file|vcf))$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
##### Joomla! core SEF Section -- END
RewriteRule ^Wakulla_News/Local_News/Wakulla_Outdoors/(.*)$ http://www.example.com/Wakulla_Outdoors/$1 [R=301,L]
^ (starts with) anchor does not include the domain stuff, you can leave that off the target as the rule is for the part between ^ and $ (end). I would replace (.*) with ? so the first part of the rule is: ^Wakulla_News/Local_News/Wakulla_Outdoors/?$ /Wakulla_Outdoors/$1 [R=301,L] Remove the http stuff and domain, you aren't rewriting that part.
The rule is:RewriteRule ^Wakulla_News/Local_News/Wakulla_Outdoors/(.*)$ http://www.example.com/Wakulla_Outdoors/$1 [R=301,L]
I cannot figure out why my RewriteRule is not being executed
RewriteRule ^Wakulla_News/Local_News/Wakulla_Outdoors/(.*)$ http://www.example.com/Wakulla_Outdoors/$1 [R=301,L]