View Full Version : Setup For .htm/.html files question
fisher318
Dec 9th 2004, 3:30 pm
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
Patient
Dec 10th 2004, 1:01 am
Try removing:
RewriteBase /
and see if that works for you.
fisher318
Dec 10th 2004, 10:43 am
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!
Patient
Dec 10th 2004, 11:17 am
Got to be worth a go.
If it doesn't work you'll just have to it the hard way.
fisher318
Dec 10th 2004, 11:24 am
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>
Patient
Dec 10th 2004, 11:28 am
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
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>
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.