I Need help .htaccess
Posted: Wed Jul 16, 2008 4:55 am
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 :
2. then I am create a file named: mybook.ft, contain only 3 row :
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:
Firstly, I thought it's something wrong with my code.
Then I try test the .htaccess, adding :
on the .htaccess file.
Inside 404.php :
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?
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>
Code: Select all
<?
echo "this is my book file, next parsing the category and subcategory";
?>
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";
?>
Then I try test the .htaccess, adding :
Code: Select all
ErrorDocument 404 404.php
Inside 404.php :
Code: Select all
<?
echo "404 error!!";
?>
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?