Change website's absolute path?

WoodysGirl

U.N.I.T.Y
Staff member
Messages
79,326
Reaction score
45,822
CowboysZone ULTIMATE Fan
Hey, does anyone know how to change an absolute path for a website?

I had to take down a site that was being mainted by a content management system. I deleted everything related to the old file setup, but the main URL is still referring to one of the old files.

I can get to the new files I uploaded by manually typing it into the address bar, but if I don't then I get a bunch of database crud.

Help?
 

Meat-O-Rama

Vegetarians are so stupid.
Messages
2,615
Reaction score
614
What webserver? IIS?

From the IIS Manager, you should be able to right click the website, select properties and point it to the new path.
 

67CowboysFan

New Member
Messages
2,345
Reaction score
1
WoodysGirl;3465500 said:
Hey, does anyone know how to change an absolute path for a website?

I had to take down a site that was being mainted by a content management system. I deleted everything related to the old file setup, but the main URL is still referring to one of the old files.

I can get to the new files I uploaded by manually typing it into the address bar, but if I don't then I get a bunch of database crud.

Help?
Is it an apache server? You can redirect via .htaccess

I reread your original question. Do you need to change the anchor link on the index page? as in <a href=""
 

WoodysGirl

U.N.I.T.Y
Staff member
Messages
79,326
Reaction score
45,822
CowboysZone ULTIMATE Fan
c0wb0y_m0nkey;3465511 said:
What webserver? IIS?

From the IIS Manager, you should be able to right click the website, select properties and point it to the new path.

67CowboysFan;3465514 said:
Is it an apache server? You can redirect via .htaccess
All I know is the site's hosted on go daddy. We're using Linux hosting. Not sure of the IIS version off the top of my head.

Also, one of the instructions I had for deleting the CMS was to delete the .htaccess file. So that's what I did. I still have it on my hard drive if I need to reinstate the file.

I don't have the godaddy site up at the moment because I'm in a webex meeting, but that's all I remember.
 

67CowboysFan

New Member
Messages
2,345
Reaction score
1
WoodysGirl;3465517 said:
All I know is the site's hosted on go daddy. We're using Linux hosting. Not sure of the IIS version off the top of my head.

Also, one of the instructions I had for deleting the CMS was to delete the .htaccess file. So that's what I did. I still have it on my hard drive if I need to reinstate the file.

I don't have the godaddy site up at the moment because I'm in a webex meeting, but that's all I remember.
Do you have yahoo messenger? If so pm me your user name and i'll walk ya through it step by step. Should be fairly easy to do.
 

YosemiteSam

Unfriendly and Aloof!
Messages
45,858
Reaction score
22,194
CowboysZone LOYAL Fan
Sounds like hard coded links in your content. I hate those! :laugh2:

There are two fixes
  1. Update any content that actually links to the old location with the new one. This isn't always feasible if there are hundreds unless you use automation. This is the proper (clean) way to do it.
  2. The dirty method is to use mod_rewrite rules. Since it's a hosting provider, as 67CowboysFan said you can use .htaccess files for that purpose.

mod_rewrite is the dirty method because your data is flawed and you are putting a bandage on it rather than actually fixing the problem.
 

Meat-O-Rama

Vegetarians are so stupid.
Messages
2,615
Reaction score
614
WoodysGirl;3465517 said:
All I know is the site's hosted on go daddy. We're using Linux hosting. Not sure of the IIS version off the top of my head.

Also, one of the instructions I had for deleting the CMS was to delete the .htaccess file. So that's what I did. I still have it on my hard drive if I need to reinstate the file.

I don't have the godaddy site up at the moment because I'm in a webex meeting, but that's all I remember.

If it's Linux, it'll be Apache as the webserver, but that's no matter. The GoDaddy control panel should be sufficient for what you need to do.

To be clear you've moved all the website files from directory to another, and you want to point the website to this new location?
 

WoodysGirl

U.N.I.T.Y
Staff member
Messages
79,326
Reaction score
45,822
CowboysZone ULTIMATE Fan
c0wb0y_m0nkey;3465534 said:
If it's Linux, it'll be Apache as the webserver, but that's no matter. The GoDaddy control panel should be sufficient for what you need to do.

To be clear you've moved all the website files from directory to another, and you want to point the website to this new location?
The updated site files are in the same directory, and I've deleted all the old CMS-related files.

According to the error that comes up, the site is pointing to a file that no longer exists in the directory because it's been deleted.

I thought deleting the mysql DB would've cleared things up, but it didn't.

Example
Typing www.site.com will cause an error and generate DB crud. Typing www.site.com/index.htm will launch the site.
 

67CowboysFan

New Member
Messages
2,345
Reaction score
1
WoodysGirl;3465540 said:
The updated site files are in the same directory, and I've deleted all the old CMS-related files.

According to the error that comes up, the site is pointing to a file that no longer exists in the directory because it's been deleted.

I thought deleting the mysql DB would've cleared things up, but it didn't.

Example
Typing www.site.com will cause an error and generate DB crud. Typing www.site.com/index.htm will launch the site.




That's something the host should be able to fix with a setting in apache. Until then use a 301 redirect in a .htaccess file.

Redirect 301 / http://www.new-site.com/

scratch that. that will redirect everything. let me find the other way to do this
 

YosemiteSam

Unfriendly and Aloof!
Messages
45,858
Reaction score
22,194
CowboysZone LOYAL Fan
WoodysGirl;3465540 said:
The updated site files are in the same directory, and I've deleted all the old CMS-related files.

According to the error that comes up, the site is pointing to a file that no longer exists in the directory because it's been deleted.

I thought deleting the mysql DB would've cleared things up, but it didn't.

Example
Typing www.site.com will cause an error and generate DB crud. Typing www.site.com/index.htm will launch the site.

This sounds like a you need to set your DirectoryIndex directive in Apache.

I've never used GoDaddy, so I'm not sure how to set it in their control panel. I think you can set it in an .htaccess file also.

EDIT:

To do this, go to the root directory of your site that is having the issue. Edit or create a file called .htaccess then put the following in it.

DirectoryIndex index.htm

That is if the file that needs to load is index.htm.
 

YosemiteSam

Unfriendly and Aloof!
Messages
45,858
Reaction score
22,194
CowboysZone LOYAL Fan
I'm outta, heading home to prepare for my trip to Dallas tomorrow morning :)

Good luck WG.
 

WoodysGirl

U.N.I.T.Y
Staff member
Messages
79,326
Reaction score
45,822
CowboysZone ULTIMATE Fan
Problem solved and I'm a dummy..

I didn't delete the old index.php file like I thought I had. After I deleted it, the site went up as normal.

Life's good again. Thanks everyone.. :)
 

67CowboysFan

New Member
Messages
2,345
Reaction score
1
WoodysGirl;3465587 said:
Problem solved and I'm a dummy..

I didn't delete the old index.php file like I thought I had. After I deleted it, the site went up as normal.

Life's good again. Thanks everyone.. :)
Now that I've thought about it a simple "view source" would have pointed out the problem right away. You are not the only one that learned something today. ;)
 

WoodysGirl

U.N.I.T.Y
Staff member
Messages
79,326
Reaction score
45,822
CowboysZone ULTIMATE Fan
67CowboysFan;3466180 said:
Now that I've thought about it a simple "view source" would have pointed out the problem right away. You are not the only one that learned something today. ;)
Thanks again for your help, tho.

And what's really funny, is about an hour after I finally got the site up. Go Daddy's servers went down. So the site was offline AGAIN.

The site owner was PO'd. Came back up after a couple hours, but yea, not a good look all the way around.
 
Top