Results 1 to 7 of 7
  1. #1
    All Around Web Guy Cursal's Avatar
    Join Date
    January 18th, 2005
    Posts
    829
    Any body know the strict/nesc. coding to convert html named pages to shtml pages via .htaccess?

    I think all I need to add is

    AddHandler server-parsed .html

    My servers are SSI compliant, but I am redesigning a site and don't want to have to rename all the pages.

    I found this link useful (again) and it tells how to do tings with htaccess pages to allow servers that don't accept SSI. Buy adding

    AddType text/html .shtml
    AddHandler server-parsed .shtml
    Options Indexes FollowSymLinks Includes

    But I would like to add only the converting from .html to .shtml.

    How much of this code is needed?

    Hope that made sense.
    TIA
    --Brian
    Oregon Publishing: Web Development, Graphic Design, Domains & Marketing
    Deluxe Banners Bartender's Guide Cooking Jobs

  2. #2
    Full Member kapsat's Avatar
    Join Date
    January 18th, 2005
    Location
    New Orleans
    Posts
    334
    i had this same problem with a site i have that is a couple years old and has many htm pages indexed.

    this is what i added to my .htaccess file
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>
    AddType text/html .shtml
    AddHandler server-parsed .html .htm
    Options Indexes FollowSymLinks Includes <HR></BLOCKQUOTE>

    that will take any .htm and .html page and treat them as if they were .shtml and your existing .htm or .html will stay intact.
    dave

  3. #3
    All Around Web Guy Cursal's Avatar
    Join Date
    January 18th, 2005
    Posts
    829
    Thank you for your reply Dave

    Got it.

    as a side note** Did you notice any extra server load because of the call to parse?

    --Brian
    Oregon Publishing: Web Development, Graphic Design, Domains & Marketing
    Deluxe Banners Bartender's Guide Cooking Jobs

  4. #4
    Full Member kapsat's Avatar
    Join Date
    January 18th, 2005
    Location
    New Orleans
    Posts
    334
    i have a dedicated server with only twenty sites on it.

    OS is Fedora and i have not found out how to check the server load in Fedora yet. But, everything seems fine and i had to use that parse on 10 of my sites.

    if you know how to check server load on Fedora OS, let me know!
    dave

  5. #5
    Devil's Reject Electropulse's Avatar
    Join Date
    January 18th, 2005
    Posts
    987
    I have this on one of my sites that I changed over from .html to .shtml, it works great:


    <pre class="ip-ubbcode-code-pre"> # Convert .html requests to .shtml -- only if the .html file
    # doesn't exist.
    #
    # Turn on the Rewrite Engine:

    RewriteEngine on

    # Cut ".html" off the end of the request, to get the basename:

    RewriteRule ^(.*)\.html$ $1 [C,E=WasHTML:yes]

    # Change the request for "basename.html" to "basename.shtml",
    # if basename.shtml exists

    RewriteCond %{REQUEST_FILENAME}.shtml -f
    RewriteRule ^(.*)$ $1.shtml [S=1]

    # If it doesn't, then put the ".html" back on the end:

    RewriteCond %{ENV:WasHTML} ^yes$
    RewriteRule ^(.*)$ $1.html
    </pre>

  6. #6
    I like traffic lights
    Join Date
    January 18th, 2005
    Location
    Southern hemisphere - away from Fukushima
    Posts
    2,936
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by kapsat:
    if you know how to check server load on Fedora OS, let me know! <HR></BLOCKQUOTE>

    try "top"

  7. #7
    Full Member
    Join Date
    January 18th, 2005
    Posts
    331
    Cursal,

    I'm not sure If this is still an issue for you or if I'm understanding the question but on the slim chance it is, and I do ..

    If you are running Cpanel on your server can't you just go into the Apache Handlers and add a user defined handler?

  8. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Can you convert HTML to flash from CJ?
    By ROCKITout in forum Commission Junction - CJ
    Replies: 2
    Last Post: April 30th, 2008, 05:15 PM
  2. Can you convert HTML to flash from CJ?
    By ROCKITout in forum Introduce Yourself
    Replies: 0
    Last Post: April 30th, 2008, 02:54 PM
  3. PHP on .HTML - .SHTML Pages
    By AddHandler in forum Programming / Datafeeds / Tools
    Replies: 11
    Last Post: April 16th, 2005, 08:52 PM
  4. changing files from .html to .shtml
    By perfectG in forum Search Engine Optimization
    Replies: 8
    Last Post: March 18th, 2003, 03:16 AM
  5. .htaccess.html file...help?
    By hershey in forum Programming / Datafeeds / Tools
    Replies: 6
    Last Post: January 9th, 2002, 07:44 PM

Posting Permissions

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