Jump to content

Migrated site now some pages are redirecting to homepage


onjegolders
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.processwire.com/categories/seo-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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...