Setup For .htm/.html files question

Discussion in 'Co-op Advertising Network' started by fisher318, Dec 9, 2004.

  1. #1
    Hey, I found the thread (http://forums.digitalpoint.com/showthread.php?t=5659) for installing on a site using .htm & .html files. I added this code to the .htaccess:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} ^(.*).htm [NC,OR]
    RewriteCond %{REQUEST_FILENAME} ^(.*).html [NC]
    RewriteRule ^(.*) /passthru.php?file=$1
    </IfModule>

    and also uploaded the required passthru.php file. Now when I go to my site I get this:

    Forbidden
    You don't have permission to access / on this server.


    --------------------------------------------------------------------------------

    Apache/1.3.27 Server at www.lendinghandsmortgage.com Port 80
     
    fisher318, Dec 9, 2004 IP
  2. Patient

    Patient Raider

    Messages:
    336
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    123
    #2
    Try removing:

    RewriteBase /

    and see if that works for you.
     
    Patient, Dec 10, 2004 IP
  3. fisher318

    fisher318 Guest

    Messages:
    61
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ok, my server company finally got back to me and gave me this:

    To turn mod_rewrite on, please put this at the top of your .htaccess file Options All RewriteEngine on

    The AddType directive you're using is not correct. Please use this instead. AddType application/x-httpd-php .php .html .htm


    Ok, so now it worked and I have 1 add on my first page at www.awesome-home-business-opportunity.com.

    For the .htaccess file I put: AddType application/x-httpd-php .php .html .htm

    My question is would it be easier to try and turn the mod_rewrite on and won't it automatically add the ads to all of my pages? While doing it the way I just did I have to add the php code to every page manually correct? any light on this subject will be great!
     
    fisher318, Dec 10, 2004 IP
  4. Patient

    Patient Raider

    Messages:
    336
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    123
    #4
    Got to be worth a go.

    If it doesn't work you'll just have to it the hard way.
     
    Patient, Dec 10, 2004 IP
  5. fisher318

    fisher318 Guest

    Messages:
    61
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Ok, in regards to this:

    To turn mod_rewrite on, please put this at the top of your .htaccess file Options All RewriteEngine on

    The AddType directive you're using is not correct. Please use this instead. AddType application/x-httpd-php .php .html .htm


    Would I add "Options All RewriteEngine on" to the top of my htaccess file that contains this code:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} ^(.*).htm [NC,OR]
    RewriteCond %{REQUEST_FILENAME} ^(.*).html [NC]
    RewriteRule ^(.*) /passthru.php?file=$1
    </IfModule>
     
    fisher318, Dec 10, 2004 IP
  6. Patient

    Patient Raider

    Messages:
    336
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    123
    #6
    I would try:

    <IfModule mod_rewrite.c>
    Options All
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} ^(.*).htm [NC,OR]
    RewriteCond %{REQUEST_FILENAME} ^(.*).html [NC]
    RewriteRule ^(.*) /passthru.php?file=$1
    </IfModule>

    and if that didn't work:

    Options All
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} ^(.*).htm [NC,OR]
    RewriteCond %{REQUEST_FILENAME} ^(.*).html [NC]
    RewriteRule ^(.*) /passthru.php?file=$1
    </IfModule

     
    Patient, Dec 10, 2004 IP