Forum Moderators: phranque
I have recently renamed a lot of directories directories on my site.e.g.
[domain.com...]
to
[domain.com...]
I have also renamed a lot of pages inside the directories e.g.
[domain.com...]
has now become
[domain.com...]
I have set up permanent 301 redirects for all of the individual pages so that spiders now that the content has been permantenly moved.
How do I cater for pages that have been indexed as
[domain.com...]
Doing it this way...
Redirect permanent /bwdgt/ [domain.com...]
...has caused problems for the individual pages that I have redirected.
Any help would be appreciated. cheers
If you mean you are having problems with query-string based resources, then Redirect directives won't work; AFAIK, they don't pass-on the query string.
If you have access to mod_rewrite, you can use rules such as
RewriteRule ^bwdgt/ http://www.domain.com/blue-widget/?%{QUERY_STRING} [R=301,L]
HTH,
Jim
How do I cater for pages that have been indexed as
[domain.com...]
You got me good on that one! :)
You can still use mod_rewrite, but if you're more comfortable with Redirect-type directives, try using RedirectMatch instead. Redirect uses prefix-matching, which I believe is the cause of your problem with directory-index pages, while RedirectMatch allows you to match exact patterns.
Jim
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: [domain.com...] );
daisho.