Gossamer Forum
Home : Products : Links 2.0 : Customization :

How do you change the templates to .shtml?

Quote Reply
How do you change the templates to .shtml?
I'm using a banner rotater (not adverts) that requires ssi and my server requires pages with ssi to be .shtml. How can I just rename my templates to .shtml and have everything work? I assume I'll have to go into my site_html_templates.pl file and change all .html template references to .shtml. What else do I have to do or is that it? I know it can't be that easy.

Thanks in advance.

Quote Reply
Re: How do you change the templates to .shtml? In reply to
In Reply To:
I assume I'll have to go into my site_html_templates.pl file and change all .html template references to .shtml.
NOPE...you do not need to do this....

There are a couple things you can do:

1) Use codes posted in this forum to update your <ROOT> .htaccess file to allow SSI calls in .html pages.

2) Simply change the following variables in your links.cfg file:

Code:

$build_extension = ".html";
$build_index = "index.html";


to the following:

Code:

$build_extension = ".shtml";
$build_index = "index.shtml";


Then you will have to delete ALL your index.html files in your LINKS generated directories.

Then rebuild your directory....

Regards,


Eliot Lee
Quote Reply
Re: How do you change the templates to .shtml? In reply to
Thanks for the help. I used #2 above and it worked fine.

One other question though. The index.shtml files are not the default files like index.html were. For example, when you type a dir like "dir/" you get an error but when the files were index.html they would come up. This is a minor problem since I just need to change my links but just wondering if there's an easy way to solve this to help visitors who don't type the full url.

Thanks again for your help.


Quote Reply
Re: How do you change the templates to .shtml? In reply to
If your web pages reside in an Apache Web Server, You need to put the following codes in your <ROOT> .htaccess file:

Code:

DirectoryIndex index.cgi index.shtml index.html index.htm /errors/forbidden.shtml


Basically...this means that the Directory Index will see the following files as "default" files:

index.cgi OR
index.html OR
index.htm OR
index.shtml OR
index.shtm OR

Then create a directory called errors and then create a file called forbidden.shtml that should have an error message like This directory is forbidden to be browsed.

If you are NOT hosting your pages in an Apache Web Server and you are not allowed to create .htaccess files in your <ROOT> directory, then consult your hosting company's technical documentation online or contact them directly to ask them to change your default file settings to index.shtml.

Regards,

Eliot Lee