Jump to content


Photo

Migrated site now some pages are redirecting to homepage

migrate homepage redirect

  • Please log in to reply
12 replies to this topic

#1 onjegolders

onjegolders

    Hero Member

  • Members
  • PipPipPipPipPip
  • 800 posts
  • 207

  • LocationMidlands, UK

Posted 01 August 2012 - 05:12 AM

Hi guys,

Have just transferred a site over to a live domain. I did the following:

Exported old db,
Created a new db on new server
Transferred files and folders to new domain
Changed db details in config.php
Imported db to new db

The site is up and all looks fine but some (at least half) of my pages are just redirecting to the homepage.

I'm scratching my head here, do any of you have any ideas where this may be coming from?

Thanks.

PS Just to add that the old site was on a subfolder ie: .com/folder, now I'm at the root level
Not sure if this makes a difference

#2 yellowled

yellowled

    Sr. Member

  • Members
  • PipPipPipPip
  • 183 posts
  • 117

  • LocationEutin, Germany

Posted 01 August 2012 - 05:22 AM

Did you maybe develop in a subdirectory and transfer to a root directory? Or did your dev site use absolute instead of relative local urls? I guess in both cases the "redirect to home" would in fact be a 404, which would only happen if your template/site doesn't provide a 404 page.

#3 SiNNuT

SiNNuT

    Sr. Member

  • Members
  • PipPipPipPip
  • 366 posts
  • 231

Posted 01 August 2012 - 05:33 AM

Is it possible that you have forgot to also transfer the .htaccess file? Cause it seems that apache rewrite engine isn't working to me. Sometimes the .htaccess file is hidden.
If it is there you could try and set
RewriteBase /
(look it up in .htaccess file).

#4 onjegolders

onjegolders

    Hero Member

  • Members
  • PipPipPipPipPip
  • 800 posts
  • 207

  • LocationMidlands, UK

Posted 01 August 2012 - 06:08 AM

Hi, thanks both of you.

Yes it was previously in a subfolder of a different domain and now it is at root level of the new domain. Pretty sure I don't have any absolute urls but will check again.

Some pages eg: /news are displaying fine while others eg: /about are showing the homepage (I should point out that the address in the address bar correctly displays /about).

I have my .htaccess file in the root and for rewritebase I see:


# RewriteBase /
# RewriteBase /pw/
# RewriteBase /~user/

Does that look ok? Thanks again

#5 onjegolders

onjegolders

    Hero Member

  • Members
  • PipPipPipPipPip
  • 800 posts
  • 207

  • LocationMidlands, UK

Posted 01 August 2012 - 07:21 AM

Also did a quick test.

If I rename the url of the page to something else, I can load the page fine so "abouts" will work fine but then when I rename back to "about", it will just show the homepage again.

Hmmm, it does sound like anything with that name gets redirected but can't see where this is coming from!

#6 yellowled

yellowled

    Sr. Member

  • Members
  • PipPipPipPip
  • 183 posts
  • 117

  • LocationEutin, Germany

Posted 01 August 2012 - 07:31 AM

Have you tried setting "RewriteBase /" in the .htaccess? I seem to remember this being necessary if moving from a subdirectory to root, but I'm not 100% sure about it.

#7 onjegolders

onjegolders

    Hero Member

  • Members
  • PipPipPipPipPip
  • 800 posts
  • 207

  • LocationMidlands, UK

Posted 01 August 2012 - 08:36 AM

Sorry Yellowled, Sinnut alluded to this and I copied out what is already in my htaccess file:

When you say setting it, what exactly do you mean?

I already have RewriteBase/ in the file.

#8 Pete

Pete

    Administrator

  • Administrators
  • 1,756 posts
  • 658

  • LocationChester, England

Posted 01 August 2012 - 08:43 AM

You need to remove te # from the start of that rewritebase line otherwise it won't run.

If that doesn't help then try deleting everything in the site/cache folder too.

#9 onjegolders

onjegolders

    Hero Member

  • Members
  • PipPipPipPipPip
  • 800 posts
  • 207

  • LocationMidlands, UK

Posted 01 August 2012 - 08:56 AM

Thanks, Pete, tried both those but to no avail sadly.
Is there any other combination for the RewriteBase apart from the standard one I should be considering?

#10 ryan

ryan

    Hero Member

  • Administrators
  • 5,773 posts
  • 3120

  • LocationAtlanta, GA

Posted 01 August 2012 - 02:14 PM

The fact that /abouts/ worked and /about/ didn't makes me think this is browser cache. Can you try from another browser? Sometimes browsers get a redirect cached in there and it's hard to clear. I don't think that you should need anything for your RewriteBase--leave it commented, and try from another computer/browser to see if it does the same thing.

Another thing to check is if you have any modules installed that might get involved with redirects, like any of these: http://modules.proce...-accessibility/ ... I don't think any should cause problems, but it would be good to know if there were any other factors at play, just in case.

#11 onjegolders

onjegolders

    Hero Member

  • Members
  • PipPipPipPipPip
  • 800 posts
  • 207

  • LocationMidlands, UK

Posted 02 August 2012 - 03:07 AM

Thanks Ryan, just tried it on Safari which I'd not used before for it and same story unfortunately.

The only modules I have on this install are

EmailObfuscator
HelloWorld
ManageFiles

Can't think why only some pages are like this and not others?
Could it be a database corruption?

#12 ryan

ryan

    Hero Member

  • Administrators
  • 5,773 posts
  • 3120

  • LocationAtlanta, GA

Posted 02 August 2012 - 11:13 AM

Doesn't sound like DB corruption, but there's no way to answer that definitively. You might try disabling those 3 modules just in case, but it seems not that likely that any of them would be interfering here. Can you PM me a link to this site so that I can try to access the URL and see what happens? I'll monitor the HTTP headers to get a little more detail about what could be happening. If you have an FTP login, this would also be helpful to get a look behind the scenes, but that's up to you.

#13 onjegolders

onjegolders

    Hero Member

  • Members
  • PipPipPipPipPip
  • 800 posts
  • 207

  • LocationMidlands, UK

Posted 09 August 2012 - 09:31 AM

Doesn't sound like DB corruption, but there's no way to answer that definitively. You might try disabling those 3 modules just in case, but it seems not that likely that any of them would be interfering here. Can you PM me a link to this site so that I can try to access the URL and see what happens? I'll monitor the HTTP headers to get a little more detail about what could be happening. If you have an FTP login, this would also be helpful to get a look behind the scenes, but that's up to you.


Sorry Ryan I didn't see this reply until now! As is so often the way I ended up having to move quickly onto a new project, so will have to check back the other one as once I'm off something for a few days, I completely lose the plot as to what was wrong in the first place!

I'll PM you as soon as I figure it out, thanks!





Also tagged with one or more of these keywords: migrate, homepage redirect

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users