onjegolders Posted August 1, 2012 Share Posted August 1, 2012 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 More sharing options...
yellowled Posted August 1, 2012 Share Posted August 1, 2012 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 More sharing options...
SiNNuT Posted August 1, 2012 Share Posted August 1, 2012 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 More sharing options...
onjegolders Posted August 1, 2012 Author Share Posted August 1, 2012 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 More sharing options...
onjegolders Posted August 1, 2012 Author Share Posted August 1, 2012 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 More sharing options...
yellowled Posted August 1, 2012 Share Posted August 1, 2012 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. Link to comment Share on other sites More sharing options...
onjegolders Posted August 1, 2012 Author Share Posted August 1, 2012 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. Link to comment Share on other sites More sharing options...
Pete Posted August 1, 2012 Share Posted August 1, 2012 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 More sharing options...
onjegolders Posted August 1, 2012 Author Share Posted August 1, 2012 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? Link to comment Share on other sites More sharing options...
ryan Posted August 1, 2012 Share Posted August 1, 2012 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 More sharing options...
onjegolders Posted August 2, 2012 Author Share Posted August 2, 2012 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 More sharing options...
ryan Posted August 2, 2012 Share Posted August 2, 2012 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 More sharing options...
onjegolders Posted August 9, 2012 Author Share Posted August 9, 2012 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now