Forum Moderators: phranque

Message Too Old, No Replies

Permanent RedirectMatch

         

Isterik

5:30 am on May 10, 2005 (gmt 0)



Hi everyone,
just started to code in php and wants to implement some changes in my webpage.

I have several thousands of html files like: www.domain.com/static-page.html and need to make permanent redirect of all of them accordingly by name to www.domain.com/static-page-20-1-3.php.

Tried to do this with RedirectMatch 301 (.*)\.html$ [wdomain.com...] but getting just some loop

jdMorgan

3:03 pm on May 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Isterik,

Welcome to WebmasterWorld!

I don't see any problem with your code that would cause a loop. The original requested URL ends in "html" whereas the new URL ends in php, making them sufficiently unique to prevent a redirection loop. I assume the "wwww" domain you typed above is what you wanted - four W's.

However, there may be other mod_alias or mod_rewrite directives at play here -- directives which might reverse the action of your new redirects, causing a loop.

Please post any other information you might have about this problem, and a relevant sample from your server error log.

Jim