Forum Moderators: phranque
On my remote server the links are all in the format src="/somefile.php" and they all work fine. However, I have recently set up my mac as a server so i can test my sites locally, and it doesn't like this link format. The links will work if i remove the slash manually, but there are a lot of them and then i would have to add them again before uploading to the remote server.
I'm sure there must be a way of doing this with .htaccess, but I can't seem to figure it out.
Any help very gratefully received
And welcome to WebmasterWorld, jameschambers.
src="/somefile.php"
Your 'somefile.php' is in the same directory as the current file, which is the root directory of your webspace. Do you have the DocumentRoot (or the server root directory) set correctly? Are you viewing your files through the webserver and not directly on your machine? ... just a thought.
Still having problems, I'm pretty new to apache so forgive me if I'm a bit slow...
I see your point about the document root but I can't see how to change it without messing up my whole server. I am running apache on my own machine, and the only links I have got to work have been rewriterules with the rewritebase set to /~jameschambers/MySite/.
However I can't see how to implement this into the whole site, so all the links will be served like this.
Thanks Again