Top VPS Hosting Provider

Welcome to the myhosting.com Forums.
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    jeffryf is offline Junior Member
    Join Date
    Mar 2010
    Posts
    1

    Default Server side includes

    I'm adding server side includes to and existing site for a non-profit organization. It's hosted on the IIS 7.0 server. The source files are simple html, but there's a lot of them. I can easily implement this, but to make the server happy I have to change the extension to shtml. Again, not a problem in itself. Here's the problem. The site is referenced by a bunch of other sites and a wide variety of users likely have specific pages bookmarked so they'll continue to open the old html pages.

    On a LAMP server, I'd just write a htaccess file, but I have no idea how to handle this in IIS other than to turn each html file into a redirect itself.

    I'm not familiar with IIS so any thoughts are appreciated.

  2. #2
    jeremya is offline Administrator
    Join Date
    Jun 2008
    Posts
    270

    Default

    You should be able to achieve this with a custom web.config file. You'll need to make individual entries for each redirect but it's far easier than performing each one individual in the IIS interface.

    <location path="example.html">
    <system.webServer>
    <httpRedirect enabled="true" destination="http://test.com/example.shtml" exactDestination="true" childOnly="true" httpResponseStatus="Permanent" />
    </system.webServer>
    </location>
    -Jeremya

  3. #3
    SmartSmith is offline Junior Member
    Join Date
    Apr 2010
    Posts
    3

    Default

    agreed. You'll save a LOT of time this way.

  4. #4
    FutbolFred is offline Junior Member
    Join Date
    Apr 2010
    Posts
    2

    Default Backup

    And don't forget to back up your files before you start messin' around!!


 

Posting Permissions

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