Web dir help needed

hi, i am having trouble mapping my web directory to show the index.php file.

the index.php that i want to be the homepage is in a subfolder - …html/home/index.php. when i go to manage my domains and then edit the web directory path to reflect this folder, my index page shows up in the browser but all the links and images are broken.

i’m sure there’s a simple fix but i think i’m too green to figure it out. thanks so much for your suggestions and help.

There’s the right way, then there are kludges.

The right place for your index.php is /home/USERNAME/DOMAIN.COM/index.php
How come yours isn’t there? The reason that editing your path doesn’t work is because the webserver now thinks that …html/home/ is the ROOT of your domain, while index.php still links to /home/something.php

If it’s just the index.php, why not copy (not move) it to …html/index.php? Or even log into shell and make a symbolic link.
If that doesn’t work, then create an index.html that’s blank, but add this line into the HEAD section:

<meta http-equiv="refresh" content="0;url=/home/index.php"/> This will immediately redirect/load your favored index.php


thanks scott. go easy on the sarcasm, ok? this is a beginner’s forum.

i understand where the ‘right’ place for the index file to be is, but i am not the kludge who designed the site in the first place, and i am not a php developer so i’m trying to keep the what little integrity there is to the files so the site won’t break as i transfer it over to my hosting.

each time i moved the index file, or all the files, out of the home subfolder and into the straight up ‘domain.com’ folder, i would get fatal error messages saying the require files were not found, even though the rel paths were correct.

i ended up using your html redirect tip, thank you for that. i would still like to understand why just putting all the files and subfolders directly into the domain.com folder yielded errors, though, to expand my knowledge.

I wasn’t being sarcastic. I think you already recognize that the current setup isn’t proper.

As for why stuff doesn’t work if you simply move it up – it’s probably a hardcoded path somewhere. Either in a config file, or buried in the database. I would try to spend the time cleaning it up so it works properly. Is this site based on code someone custom wrote, or is this a downloadable package that’s widely available? Without knowing what it is that you’re actually running, people here can only give general suggestions.