Webhosting Directory Index: Difference between revisions
Appearance
Content deleted Content added
Created page with "link=:Category:Webhosting The web server does not automatically produce a directory index, i.e. a list of files in a directory if there is no index page. H..." |
No edit summary |
||
| Line 4: | Line 4: | ||
The web server does not automatically produce a directory index, i.e. a list of files in a directory if there is no index page. However, it is simple to add a directory index to a directory using a simple script. If you load the following as index.html then it will produce a simple directory index for the directory it is in. Obviously a much more sophisticated script could be written with icons, and sub directories, and so on, and there may be such scripts available on the web in perl. |
The web server does not automatically produce a directory index, i.e. a list of files in a directory if there is no index page. However, it is simple to add a directory index to a directory using a simple script. If you load the following as index.html then it will produce a simple directory index for the directory it is in. Obviously a much more sophisticated script could be written with icons, and sub directories, and so on, and there may be such scripts available on the web in perl. |
||
<syntaxhighlight |
|||
#!/bin/csh |
#!/bin/csh |
||
echo "Content-Type: text/html" |
echo "Content-Type: text/html" |
||
| Line 16: | Line 17: | ||
/bin/ls -ld "$f" |
/bin/ls -ld "$f" |
||
end |
end |
||
</syntaxhighlight |
|||
==Other Webhosting pages:== |
==Other Webhosting pages:== |
||