1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help needed: shtml +php

Discussion in 'PHP' started by roca, Oct 30, 2008.

  1. #1
    I am not able to make php work on a website which is in shtml. It has something to do with rewrite_rule v .htaccess but I dont know what so those rewrites do not allow php to work. So how to make .shtml work with php on a website? THANKS

    ErrorDocument 404 /index.shtml

    Addtype image/bmp bmp

    AddType application/rss+xml .rss

    #AddType text/xml .rss

    AddType text/html .shtml

    AddHandler server-parsed .shtml

    # This is important, without this it doesn work - Ssi doesnt work

    Options Indexes FollowSymLinks Includes

    DirectoryIndex index.shtml

    # prehistoric php version 2 mime-types,

    # phased out at server level march 2003 - TAB

    AddType text/x-php-parsed-html .phtml

    AddType text/x-php5-parsed-html .php

    AddDefaultCharset Off


    # FollowSymLinks is needed for mod_rewrite,

    # without you'll get 100% 403 errors

    Options +FollowSymLinks

    RewriteEngine On

    RewriteBase /


    RewriteEngine On

    RewriteCond %{HTTP_REFERER} !^http://(.+\.)?komis\.sk/ [NC]

    RewriteCond %{HTTP_REFERER} !^http://(.+\.)?thenews\.sk/ [NC]

    RewriteCond %{HTTP_REFERER} !^$

    RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpe [L]

    RewriteCond %{REQUEST_FILENAME} .*jpg$|.*gif$|.*png$ [NC]

    RewriteCond %{HTTP_REFERER} !^$

    RewriteCond %{HTTP_REFERER} !komis\.sk [NC]

    RewriteCond %{HTTP_REFERER} !friendlysite\.com [NC]

    RewriteCond %{HTTP_REFERER} !google\. [NC]
    RewriteCond %{HTTP_REFERER} !search\?q=cache [NC]

    #RewriteRule (.*) /images/showpic.php?pic=$1
    roca, Oct 30, 2008 IP