Moved my site to the server root ; links still pointing to old base URL
Permalink
My website was in the folder /test.
I have not been developping or customizing the website, but I had to put it online, which meant moving it from /test to /.
Backed up everything, it all worked fine, but the links in the nav are still pointing to /test/...
I've seen a lot of similar requests on the forum and the main answers are :
* Change the DIR REL in the config/site.php file ; but it doesn't appear on my site.php file
* Update the htaccess file ; and this one is not on the server even when after turning on hidden files
* Alongside with clearing cache, disabling pretty URLs, etc.
In the navigation.php file, all links are # ; I don't know where the configuration of those links can be found...
Thanks for your answers
I have not been developping or customizing the website, but I had to put it online, which meant moving it from /test to /.
Backed up everything, it all worked fine, but the links in the nav are still pointing to /test/...
I've seen a lot of similar requests on the forum and the main answers are :
* Change the DIR REL in the config/site.php file ; but it doesn't appear on my site.php file
* Update the htaccess file ; and this one is not on the server even when after turning on hidden files
* Alongside with clearing cache, disabling pretty URLs, etc.
In the navigation.php file, all links are # ; I don't know where the configuration of those links can be found...
Thanks for your answers
Hi Hutman, and thanks for your fast answer.
I would suggest first to try adding both a BASE_URL and a DIR_REL into your config/site.php. The BASE_URL should be your site's main URL and the DIR_REL can be defined as just blank.
> I have tried that already ! Cleared C5 and browser cache, in vain.
If you have pretty URLs turned on (and working) there has to be a .htaccess file in the root of your site or they wouldn't work, I would suggest disabling Pretty URLs and turning them back on, it will either tell you the file was created for you, or give you the code to create it yourself.
> Actually they are not turned on and I don't need them.
Clearing cache (or manually deleting all files in the /files/cache directory) should be done, but I'm sure you have done that already.
> I have :(
Is your nav an auto nav, or is it something custom that you built?
> Again, the developper is not available and I have to put it online ASAP. That's why I don't know where to configure the nav, or if its auto nav or custom. If that can help, here's the website : wwww.h2a-capital.com. I also did not specify that but the homepage is working fine, I can access the pages to the correct URLs. It's just the nav links that are still wrong.
Sorry for so much of the same information you have seen before, but usually these things work to get things moved correctly.
> I know :) But maybe it's much easier... Anyway I'm struggling :) Thanks again.
I would suggest first to try adding both a BASE_URL and a DIR_REL into your config/site.php. The BASE_URL should be your site's main URL and the DIR_REL can be defined as just blank.
> I have tried that already ! Cleared C5 and browser cache, in vain.
If you have pretty URLs turned on (and working) there has to be a .htaccess file in the root of your site or they wouldn't work, I would suggest disabling Pretty URLs and turning them back on, it will either tell you the file was created for you, or give you the code to create it yourself.
> Actually they are not turned on and I don't need them.
Clearing cache (or manually deleting all files in the /files/cache directory) should be done, but I'm sure you have done that already.
> I have :(
Is your nav an auto nav, or is it something custom that you built?
> Again, the developper is not available and I have to put it online ASAP. That's why I don't know where to configure the nav, or if its auto nav or custom. If that can help, here's the website : wwww.h2a-capital.com. I also did not specify that but the homepage is working fine, I can access the pages to the correct URLs. It's just the nav links that are still wrong.
Sorry for so much of the same information you have seen before, but usually these things work to get things moved correctly.
> I know :) But maybe it's much easier... Anyway I'm struggling :) Thanks again.
I looked at the site and it looks to me like the navigation is created with auto-nav, so that should pull the settings from the site.php without having to mess with it.
Can you try a few things?
1) Turn off Caching, set everything to off (just for now)
2) Clear the Cache after it is turned off
3) Double check that your site.php has these two lines
4) Turn on Pretty URLs, I know you said you don't need them, but they don't hurt and might help.
One other thing that I noticed is that on your homepage your URLs display with capital letters, but when I take the /test out of them they display lower case. This makes me think there is something else going on.
Let me know what happens after you've completed those things (if anything).
Can you try a few things?
1) Turn off Caching, set everything to off (just for now)
2) Clear the Cache after it is turned off
3) Double check that your site.php has these two lines
4) Turn on Pretty URLs, I know you said you don't need them, but they don't hurt and might help.
One other thing that I noticed is that on your homepage your URLs display with capital letters, but when I take the /test out of them they display lower case. This makes me think there is something else going on.
Let me know what happens after you've completed those things (if anything).
Ok I've done all the steps you've mentionned, and it's still pointing to /test/ but the page now looks different (used to be a 1&1 404 page, now it's a C5 404).
Also, I'm not experiencing the capital problem you're talking about...
I'm going to clear my browser cache see if it helps !
Also, I'm not experiencing the capital problem you're talking about...
I'm going to clear my browser cache see if it helps !
Alright, there is definitely something goofy going on here.
Here is the link in the Navigationhttp://www.h2a-capital.com/test/index.php/Conseil/... here is what it redirects to when I remove the /testhttp://www.h2a-capital.com/conseil/...
See how the Conseil is not consistent with the case? I'm also noticing that this linkhttp://www.h2a-capital.com/themes/LPB/image/logo.png... is broken, which should be pointing to the root of your site.
Can you please check and see if that file does exist on your server? Also, did you remove all files from the /test directory or are they still there?
Here is the link in the Navigationhttp://www.h2a-capital.com/test/index.php/Conseil/... here is what it redirects to when I remove the /testhttp://www.h2a-capital.com/conseil/...
See how the Conseil is not consistent with the case? I'm also noticing that this linkhttp://www.h2a-capital.com/themes/LPB/image/logo.png... is broken, which should be pointing to the root of your site.
Can you please check and see if that file does exist on your server? Also, did you remove all files from the /test directory or are they still there?
[No change after clearing cache btw]
Ah, this is new... Basically what I had before was this :
* Working homepage
* Nav link tohttp://www.h2a-capital.com/test/index.php/Conseil/...
* Remove the /test part
* Then I'm onhttp://www.h2a-capital.com/index.php/Conseil/... which is the correct page
Now, indeed, it does redirect me tohttp://www.h2a-capital.com/conseil/... with the lowercase. That page is now broken because the block is doubled and incomplete. Also the logo image is missing.
About the image, if it was the logo, it is missing from the website now...
What I initially did was :
* Backing up the whole /test directory to my PC
* Moving /test to /Backup/test
* Copying that same folder to the root
It seems like these few steps have kind of backfired ; or maybe they're showing more clearly what's happening. Anyway, I have no idea what's going on... :(
Ah, this is new... Basically what I had before was this :
* Working homepage
* Nav link tohttp://www.h2a-capital.com/test/index.php/Conseil/...
* Remove the /test part
* Then I'm onhttp://www.h2a-capital.com/index.php/Conseil/... which is the correct page
Now, indeed, it does redirect me tohttp://www.h2a-capital.com/conseil/... with the lowercase. That page is now broken because the block is doubled and incomplete. Also the logo image is missing.
About the image, if it was the logo, it is missing from the website now...
What I initially did was :
* Backing up the whole /test directory to my PC
* Moving /test to /Backup/test
* Copying that same folder to the root
It seems like these few steps have kind of backfired ; or maybe they're showing more clearly what's happening. Anyway, I have no idea what's going on... :(
If you still have the files on your PC or in the /Backup directory can you see if this file /themes/LPB/image/logo.png still exists in either one?
For some reason I feel like 1/2 of the site is pulling from the old /test directory and 1/2 from the new root stuff.
If you login to the CMS can you go to the Full Sitemap, go to Properties for the Conseil page and under Page Paths and Location include what is listed for Canonical URL.
Your URLs shouldn't be uppercase, so I'm somewhat concerned at why they are/were every displaying uppercase.
For some reason I feel like 1/2 of the site is pulling from the old /test directory and 1/2 from the new root stuff.
If you login to the CMS can you go to the Full Sitemap, go to Properties for the Conseil page and under Page Paths and Location include what is listed for Canonical URL.
Your URLs shouldn't be uppercase, so I'm somewhat concerned at why they are/were every displaying uppercase.
Here's what I had for that :https://cloudup.com/cvujeihqCWA...
Just so you know, the Conseil page is being fishy.
The block has been doubled as I was saying, except that in Edit mode I can't edit that 2nd block. Also the blocks are missing a part of the code...
The block has been doubled as I was saying, except that in Edit mode I can't edit that 2nd block. Also the blocks are missing a part of the code...
When you moved the site did you also move the database?
I did not copy the database, I did back it up on PHPMyAdmin but as it was only a change of directory I thought I wouldn't need to re-import it ?
Also I was going to do so, but my hosting plan only allows me to have 1 database, so I would have to delete the current to create a new one.
Also I was going to do so, but my hosting plan only allows me to have 1 database, so I would have to delete the current to create a new one.
That's fine that you didn't move it, but what is interesting is that all of the block records (like which blocks are on which pages) are stored in the database. So if you are saying that this block is only screwed up after moving the files then something go changed in your files to call that area twice or something to that affect.
Also, if changing the PrettyURL setting in the CMS makes your URLs different and loses your Logo there is either an index.html that is actually showing when you get to the site (not the CMS homepage), or there is something wrong with your theme, because that should not affect the files at all.
Also, if changing the PrettyURL setting in the CMS makes your URLs different and loses your Logo there is either an index.html that is actually showing when you get to the site (not the CMS homepage), or there is something wrong with your theme, because that should not affect the files at all.
Ok... Well thanks anyway for you help and time... I don't know how I'll make this work :(
PS : After re-deisabling pretty URLs, the logo's back, the case / redirection problem is not here anymore... But the issue's the same as before :)
What I can tell from this is that the CMS is using the correct BASE_URL and DIR_REL because otherwise that would display with /test
Which purchased theme are you using for the front end? Is your cache still turned off?
Which purchased theme are you using for the front end? Is your cache still turned off?
Here are the themes :https://cloudup.com/cv2LxkmQR-a...
FYI, the last one, which has been made by the developper says : This theme contains no styles that can be customized.
FYI, the last one, which has been made by the developper says : This theme contains no styles that can be customized.
Where did you acquire this theme? It certainly did not come from the Marketplace if there is no thumbnail.
Yea as I said this one's been made by the developer.
If you go into the /themes/LPB/default.php are you able to see where the navigation is generated?
It will either be in that file, or at the top of that file if it is including a header or something of that nature.
I'm starting to wonder if the navigation is actually hard coded and not pulling in through AutoNav, that would explain a lot in this situation.
It will either be in that file, or at the top of that file if it is including a header or something of that nature.
I'm starting to wonder if the navigation is actually hard coded and not pulling in through AutoNav, that would explain a lot in this situation.
Oooook that was it ! I did not even check cause I thought it wouldn't be hardcoded :x
Thanks a lot for this, I'm gonna edit the code, see if it all works.
I've managed to correct the doubled content problem (I might have changed the page type by mistake at some point). So hopefully it should all be fixed in the next hour - will let you know.
Thanks so much for you time Hutman !
Thanks a lot for this, I'm gonna edit the code, see if it all works.
I've managed to correct the doubled content problem (I might have changed the page type by mistake at some point). So hopefully it should all be fixed in the next hour - will let you know.
Thanks so much for you time Hutman !
It's all good now... I feel bad I made you waste time on such a dumb oversight... Thanks a lot anyway !
If you have pretty URLs turned on (and working) there has to be a .htaccess file in the root of your site or they wouldn't work, I would suggest disabling Pretty URLs and turning them back on, it will either tell you the file was created for you, or give you the code to create it yourself.
Clearing cache (or manually deleting all files in the /files/cache directory) should be done, but I'm sure you have done that already.
Is your nav an auto nav, or is it something custom that you built?
Sorry for so much of the same information you have seen before, but usually these things work to get things moved correctly.