I Need help .htaccess

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
benza
Forum Newbie
Posts: 2
Joined: Tue Jul 15, 2008 12:46 pm

I Need help .htaccess

Post by benza »

Hello,

I am new in this forum, trying to get answers or solution from all the expert here, I got no answer from another forum.
I am trying to implement search engine friendly, after googling and read some articles, decide to implement using Forcetype.
This is what I do :
1. I am creating a .htaccess file contain :

Code: Select all

 
<Files mybook.ft>
ForceType application/x-httpd-php
</Files>
 
2. then I am create a file named: mybook.ft, contain only 3 row :

Code: Select all

 
<?
    echo "this is my book file, next parsing the category and subcategory";
?>
 
3. both of this files saved on a folder : forcetype.
when I run it on the browser : http://localhost/forcetype/mybook, the output is exactly the PHP script on mybook.ft:

Code: Select all

 
<?
    echo "this is my book file, next parsing the category and subcategory";
?>
 
Firstly, I thought it's something wrong with my code.
Then I try test the .htaccess, adding :

Code: Select all

 
ErrorDocument 404 404.php
 
on the .htaccess file.

Inside 404.php :

Code: Select all

 
<?
    echo "404 error!!";
?>
 
Test again on browser: http://localhost/forcetype/mybook-test.php (note: no mybook-test.php on my folder). But the 404.php isn't loaded. The output is the standard 404 error by local server.

What's wrong? I think my .htaccess not loaded, isn't ?
If 404.php is loaded when no file found, then I can continue to my search engine friendly url.

for info: I am using XAMPP and firefox.

Please help..

After write above, I am test on live server, and it's work.
Any ide why on XAMPP local server not working?
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Re: I Need help .htaccess

Post by Maugrim_The_Reaper »

Maybe mime_mod is not enabled in your http.conf. That would be unusual though - it's a XAMPP default to have it enabled as far I remember.
benza
Forum Newbie
Posts: 2
Joined: Tue Jul 15, 2008 12:46 pm

Re: I Need help .htaccess

Post by benza »

You mean :
LoadModule mime_module modules/mod_mime.so

It's already loaded and still not working.

any help?
Post Reply