Forum Moderators: phranque
I know my developer when moving the site set up a 302 redirect for anyone using old links, but that shouldn't be causing my banned IPs to be redirected, should it?
At that time all my directory names changed (site redesigned) and it was easier to just send everyone back to the home page (with a 302 redirect) when they were arriving from one of the old links.
Once they get to the new folder in the new directory, they will be able to easily see the page they want.
... log entries from before and after:
1.202.nnn.n - - [09/Mar/2012:08:43:17 -0500] "GET /robots.txt HTTP/1.0" 403 - "-" "\"Mozilla/5.0"
1.202.nnn.n - - [02/Apr/2012:07:54:04 -0400] "GET /robots.txt HTTP/1.0" 302 - "-" "\"Mozilla/5.0"
# meta-RegEx:
# change . to \.
# ^(Redirect \d\d\d \S+?[^\\])\. TO \1\\.
# now change Redirect to Rewrite
# ^Redirect(?:Match)? 301 /(.+) TO RewriteRule \1 [R=301,L]
# and
# ^Redirect(?:Match)? 410 /(.+) TO RewriteRule \1 - [G,L]
What I wanted to do was have the redirect send visitors from the directory of the old link to the new directory, without having to list every single page.
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index.php
RewriteRule (([^/]+/)*)index\.php http://www.example.com/$1 [R=301,L] By the way, g1msd, your stickymail box is full.
If someone is looking for /oldstore/ can I do a 301 redirect to www.example.com without having to do one for each html file?