Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Location
    IN, USA
    Posts
    121
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Big .htaccess Problem

    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.
    Just call me Crash...
    "Crash- and BURN!"
    -Cereal Killer

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    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.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    Regular Coder
    Join Date
    Aug 2002
    Location
    IN, USA
    Posts
    121
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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)?
    Just call me Crash...
    "Crash- and BURN!"
    -Cereal Killer

  • #4
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    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.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #5
    Regular Coder
    Join Date
    Aug 2002
    Location
    IN, USA
    Posts
    121
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you so much, I will try that. I guess its time I start learning more server stuff
    Just call me Crash...
    "Crash- and BURN!"
    -Cereal Killer

  • #6
    New Coder
    Join Date
    Nov 2002
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #7
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    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.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •