LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to create symbolic link to html file and avoid page link problem? (http://www.linuxquestions.org/questions/linux-general-1/how-to-create-symbolic-link-to-html-file-and-avoid-page-link-problem-617090/)

haxpor 01-29-2008 05:33 AM

How to create symbolic link to html file and avoid page link problem?
 
I have 'docs' folder which is normal programming document.
When I try to create sym link for it, so I can access the page with ease,
with the following command.

Code:

ln -s /data1/docs/index.html /home/haxpor/Desktop/API_DOC
It looks fine. But when I acces that sym link file, the page doesn't load up.

In the URL of the browser, it shows
'file:///home/haxpor/documentation.html', which is absolutely wrong.

So I look in the 'index.html' file and see that it will load up 'document.html' first with the following href-tag.

Code:

<h1><a href="./documentation.html">Documentation</a></h1>
As you know I loged in as haxpor.

Is it right to link to my home folder?
How can I solve this problem so I can browse for all links in 'docs' folder without problem?

Thanks in advance.

David1357 01-29-2008 06:52 AM

Quote:

Originally Posted by haxpor (Post 3038629)
So I look in the 'index.html' file and see that it will load up 'document.html' first with the following href-tag.

Code:

<h1><a href="./documentation.html">Documentation</a></h1>

If all your html documents are in the same directory, you can create a symbolic link to the directory. For example
Code:

# ln -s /data1/docs /home/haxpor/Desktop/API_DOC
Then you can open the "API_DOC" folder and click on "index.html".

haxpor 01-29-2008 07:40 AM

Thanks David1357,

But Is there anyway that I can link to it, load it up, and not even click on the file in file browser?


All times are GMT -5. The time now is 12:39 AM.