Forum Moderators: phranque

Message Too Old, No Replies

New to .htaccess

Having trouble with ForceType

         

wfernley

6:19 pm on Dec 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello everyone,

Well I am trying to convert my site to have cleaner urls. I am first working on the .htaccess file which I started learning about today. I am trying to make it so whenever I try to open my products.php file I dont have to put the .php. So basically type www.mysite.com/products. For some reason I cant get this working. If I put this:

<Files products>
ForceType application/x-httpd-php
</Files>

It doesnt work and if I put this:

<Files /products>
ForceType application/x-httpd-php
</Files>

It will kinda work, it will display the HTML but not the PHP. I am kinda confused. I looked into my hosting company and they are not running it module but CGI. Also it's PHP v4.3.10 and Apache v1.3.31. Can anyone help me out?

thanks :D

Wes

coopster

2:22 pm on Dec 31, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Have you looked into Apache Content Negotiation [httpd.apache.org] at all yet? What you are describing that you want to do is exactly what Apache Content Negotiation is capable of doing.