The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Strange redirections after a server move

Discussion in 'General Discussion' started by soundguy, Apr 13, 2008.

  1. soundguy

    soundguy Well-Known Member
    PartnerNOC

    Joined:
    Oct 29, 2003
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    seattle
    I just moved a site from one cPanel server to another (both on Release) like I have hundreds of times before and everything went well except that I now have some kind of unwanted redirection on a lot of files and folders. When trying to access the problem files, I get a 404 that reads:

    The requested URL /moving.page/ was not found on this server

    I don't know where the hell this came from but it definitely has nothing to do with the site. I'm guessing that this is some kind of broken cPanel function. It's happening on both servers so it must have been done before or during the packaging process. Anyone else ever seen this behavior?
     
  2. psipro

    psipro Member

    Joined:
    Jul 20, 2006
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    I am having the same problem, anyone have suggestions or a solution?
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Just a guess, but it sounds like that backup didn't go so well. You might try to generate a new one and see if that works. Might also want to make sure the account on the old server has enough space before running the backup.
     
  4. psipro

    psipro Member

    Joined:
    Jul 20, 2006
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Well I found the error, the the following line was added to .htaccess

    "RedirectMatch \.(dynamiccontent|pl|plx|perl|cgi|php|php4|php4|php6|php3|shtml)$ http://server/moving.page/"

    that would do it.

    So I assume that it adds this redirect if there are any of those extensions in the home directory.
     
    #4 psipro, May 3, 2008
    Last edited: May 4, 2008
  5. vincentg

    vincentg Well-Known Member

    Joined:
    May 12, 2004
    Messages:
    140
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    new york
    I got the same problem.

    Why would you add that line at all???
    RedirectMatch \.(dynamiccontent|pl|plx|perl|cgi|php|php4|php4|php6|php3|shtml)$ http://modernage.dns-safe.net/moving.page/

    In the past the copy account normally works very good except for the fact it doesn't copy .htaccess files.

    I do like the fact they added the option to change the DNS settings on the server the site is moving from. This saves time.

    But can someone explain why they would add this Redirect line to .htaccess.

    There is no need for it at all.
     
  6. kaidok.net

    kaidok.net Member

    Joined:
    Mar 7, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Any news as to why this happens?
     
  7. scottc

    scottc Well-Known Member

    Joined:
    Apr 21, 2002
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    There appears to be a new option when moving accounts where cpanel redirects traffic to the new server. However, on our server it gives 500 errors because of incorrect syntax in the lines added to the .htaccess files.

    [Tue Jul 01 01:44:12 2008] [alert] [client 11.22.22.92] /home/username/public_html/.htaccess: RewriteCond: bad flag delimiters
     
  8. kaidok.net

    kaidok.net Member

    Joined:
    Mar 7, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Well I have found a work around. I rename the .htaccess file on the old server before transfer. After transfer I del the .htaccess that is created during the copy and rename the original back to .htaccess. It is a pain but it sure does work better than the old way of transferring accounts and monkeying with DNS to do a server change.
     
  9. Snowman30

    Snowman30 Well-Known Member
    PartnerNOC

    Joined:
    Apr 7, 2002
    Messages:
    681
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    Just noticed the same issue occuring on a couple of our servers... it was working a few weeks ago...

    anyone reported it as a bug yet?
     
  10. johnsee

    johnsee Member

    Joined:
    Mar 14, 2006
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Also noticed this one
     
  11. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Seeing moving.page errors also

    I'm seeing the same thing in my Stable Release -- WHM 11.23.2 cPanel 11.23.4-S26138

    I like that cPanel is continuing to make improvements in the transfer process. But I don't really know where they are going with this "moving.page" business. :confused:

    I've opened Ticket #301041 with cPanel to look into this.

    I'll keep you posted.

    - Scott
     
  12. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Ok, it turns out that cPanel is already working on this (there is an internal dev ticket 7142, in case anyone from cPanel is lurking and wants to see).

    For now, I simply copied the example suspended page that cPanel provides, into my main host htdocs directory (the same place that suspended.page exists), like this:

    cp /usr/local/cpanel/whostmgr/etc/moving.page.html /etc/httpd/htdocs/moving.page/index.html

    Now, users are shown a meaningful page, instead of a 404 error, in case they are viewing the old server after a transfer.

    If you don't want users to get this page at all, then you'll have to remove the rewrite out of .htaccess, as scottc has already mentioned.

    Hope this helps...

    - Scott
     
  13. Snowman30

    Snowman30 Well-Known Member
    PartnerNOC

    Joined:
    Apr 7, 2002
    Messages:
    681
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    what i dont get is that if i change the A records and point the old dns to the new one it used to work well

    now since this has been introduced clients are re-routed... very frustrating
     
  14. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Then you have been thinking that you were seeing the new server, and instead you were looking at the old server instead. Now with this redirection, it will be more obvious where before, it was harder to know.

    The ONLY way you can see the moving.page redirection is if your PC has the wrong IP address in cache (or the DNS you use has it in cache) and you are going to the wrong server.

    I think cPanel's reasoning for this, is that if you have an active ecommerce site or database-driven site, it would be better to not let someone use the wrong site.

    I believe that this redirection should be optional... there should be a checkbox on the Transfer page, much like there is a checkbox for pointing DNS on the old server to the new IP. I haven't had the energy to submit a Bugzilla feature request yet. :p

    - Scott
     
  15. websnail.net

    websnail.net Active Member

    Joined:
    Mar 24, 2002
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Small errata on that..

    Code:
    mkdir /etc/httpd/htdocs/moving.page
    cp /usr/local/cpanel/whostmgr/etc/moving.page.html /etc/httpd/htdocs/moving.page/index.html
    That will then work first time without worrying about the missing moving.page directory
     
  16. Silver_2000

    Silver_2000 Well-Known Member

    Joined:
    Mar 31, 2002
    Messages:
    338
    Likes Received:
    1
    Trophy Points:
    18
    It only works if the htaccess has the host name in it NOT the domain name

    domainname.com/moving.page/ doesnt go anywhere

    hostname.server.com/moving.page/ goes to the notice

     
Loading...

Share This Page