Click to See Complete Forum and Search --> : Symbolic links


picto
03-04-2005, 10:40 AM
Hi, I want to create a test folder on my website which I can use to update the site to see how it looks online (using SSI so can't see it properly unless it's online) before I replace the old version.

The problem is that I have a lot of large files in other folders that I want to link to, but I would have to change all of the relative addresses once I move my test contents to their correct place and I don't want to copy those big files into the test folder also.

Is it possible to use symbolic links for media files on a web server, and if so how would I create them without shell access (I only have ftp access to the server)

Thanks in advance

jettlarue
03-04-2005, 04:56 PM
im not really sure of what you want but you could use php and have the entire page be a string then ECHO it and to change it run a sql injection to change the variable...

NogDog
03-04-2005, 05:35 PM
I believe you could add a BASE tag to your HEAD section to specify where relative links should start from (note that it must be a full URI):

<head>
<base href="http://www.mysite.com/"> <!-- add " />" to end if xhtml -->
</head>

picto
03-04-2005, 07:21 PM
I thought of doing that, but this would link back to the original pages instead of the new test pages whenever I click on a menu link.

If I cannot find the solution I am asking about here, I will probably move the current html files from the root directory to a pages directory, then any media files will be addressed as ../file.ext and so will be found from both /pages/ and /test/

This will require a lot of link changes, but it may be the easier option in the long run

philaweb
03-04-2005, 10:08 PM
A good webeditor has the option of doing extended search and replace commands, which means you're able to change certain strings of code in documents within an entire directory or even disk partition without even opening the files.

I've changed path info in hundreds of script files that I wanted to move from one server to the other with a very short notice.