Forum Moderators: phranque
I'm desperately seeking help on the following issue. I try to create a temp redirect looking something like this but I simply can't get to work.
RedirectTemp /Page([A-Za-z0-9]+).html [website.com...]
This should be redirecting all pages that are located inside the root folder, looking like PageAnything.html to a different domain.
If anyone can help me by pointing me in the right direction I would be very thankful.
best regards
Sascha
Welcome to WebmasterWorld!
RedirectTemp is part of mod_alias, not mod_rewrite.
Also, the Redirect directive and its variants use prefix-matching, not regular expressions.
See Apache RedirectMatch [httpd.apache.org] if you want to use regular expressions.
RedirectMatch 302 ^/Page([^.]+)\.html$ http://www.website.com/
Jim
Thanks for your welcome and for the quick help. I just tried it and it works a charm. Thank you very much.
Just one last question. What will happen if I leave a temporary redirect on for to long? Will it compromise search engine results or will it create another negative effect for the domain. If so, for which one. The new or old one or even both?
best regards
Sascha
To a search engine, a 302 means, "Index the content of the new URL, but keep the old URL in your index." Whether that is a good or bad thing depends on what you intended to accomplish.
Just be aware that 301 and 302 and all the other server response codes [w3.org] have very specific meanings, and cannot be used interchangeably without creating problems.
Jim