Hi.

Just recently my site has stopped working. All the urls on my site have gone haywire and therefore all links and files are not loading correctly.

I am using a CMS called skeleton which is really more of a very basic flat file templating tool.

One really useful feature is that I am able to use <?=$url->base?> in my html and the script will in turn replace it with http://sevenupcan.com/website/ . This means I don't have to change all the base urls for any of my links or files even if I move the site to another domain.

However just recently these links no longer display the correct url. Instead they are now displaying http://sevenupcan.com/nfs/c01/h09/mnt/488/domains/sevenupcan.com/html/ I believe the script that controls this is...

$url->base = 'http://' . $_SERVER['HTTP_HOST'] . str_replace($_SERVER['PHP_SELF'], '', ROOT);

Unfortunately I don't know much PHP and I can't work out what the script is doing and therefore cannot diagnose the problem. More so I don't understand why this has stopped working as I haven't made any changes to the files recently. I even have another site with this framework on the same host and it has stopped working too.

My host has not provided me with much help and it has been really frustrating as I know they have done something to trigger this yet they are reluctant to acknowledge that this might be the case.

Can anyone help me?

It might be worth mentioning that the framework also uses a .htaccess file which contains the following code...

Options +FollowSymLinks


	RewriteEngine on
	RewriteCond %{REQUEST_FILENAME} !-s
	Rewriterule (.*) index.php

I really appreciate your time in reading my post.

It looks like that your $url->base value were replaced with project dir, not the project path, they are completely different, try to find somewhere in the code other possible assignemnts to $url->base.
I believe .htaccess has nothing to do with that.

Just noticed another piece of code at the top which looks important...

// THIS is the root directory
define('ROOT', getcwd());

// make some URL's
$url = new stdClass();
	$url->root = ROOT;
	$url->base = 'http://' . $_SERVER['HTTP_HOST'] . str_replace($_SERVER['DOCUMENT_ROOT'], '', ROOT);
	$url->theme = $url->base . '/theme';

getcwd() looks like this might be holding the document path or dir not sure of the difference. However I still don't understand how this in returning a different url to what it was a week ago. What could my host have done?

This article has been dead for over six months. Start a new discussion instead.