PDA

View Full Version : Big .htaccess Problem



CRASH_OVERRIDE
03-27-2003, 12:48 AM
Hey folks, haven't posted here for a while! Ive been very busy on my new site ;) .

I have a big problem involving SSI, Windows 2000 Server, and .htaccess (this is my first time dealing with web server technologies). I decided to do my whole site using SSI, to import sections of the document from external HTML files. The problem is that you need the '.shtml' file extension in order for the SSI to work. So I do that, and find out that 'http://www.mysite.com' does not reference to the index file with the extension '.shtml'. It has, of course, worked before using the '.htm' extension for the index files.

I then tried using .htaccess to change the index page, but to my great despair, my host doesnt allow .htaccess!

Is there any other ways to have SSI and still be able to reference folder indexes without the file name?

Thanks in advance. :confused:

Spookster
03-27-2003, 01:15 AM
Unless your host is willing to change a setting in Apache's config file to add index.shtml as one of the default files then you are out of luck.

Find another host that allows .htaccess. Or use PHP if they support that.

CRASH_OVERRIDE
03-27-2003, 01:40 AM
Thank you, Ill try asking them about adding index.shtml.

My host does in fact support PHP, but I have almost no knowledge of it. How would you do what I am trying to do through PHP (I am very willing to learn new languages)?

Spookster
03-27-2003, 01:54 AM
A slight correction to my previous post....I thought your host was using Apache but they would be using IIS if they are running Win2000. But they can do the same thing with IIS though, they just need to add index.shtml to the list of default files.

In PHP you would need for your pages to have .php extensions.

Of course you may end up with the same problem as before if your host does not have index.php in their list of default files.

But in PHP or even ASP if your host supports that you can include files quite easily.

PHP:

<?php include("somepage.yaks"); ?>

ASP:

<% #include file="somepage.blah" %>

In addition if you ever wanted to add other functionality to your site then you won't be able to do that using SSI but with PHP or ASP you leave your options open.

CRASH_OVERRIDE
03-27-2003, 04:51 AM
Thank you so much, I will try that. I guess its time I start learning more server stuff :thumbsup:

Darknight
04-07-2003, 10:21 PM
Originally posted by Spookster
A slight correction to my previous post....I thought your host was using Apache but they would be using IIS if they are running Win2000.
I run Apache on Win2000 and WinXP :)

Spookster
04-08-2003, 12:37 AM
Originally posted by Darknight
I run Apache on Win2000 and WinXP :)

Yes you can run Apache on Windows but it is unstable so a webhost won't be running apache on windows. It is perfectly fine for a local testing server but not for a production server. I run apache on winXP myself for testing.