LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-07-2011, 02:11 PM   #1
Helstedxd
LQ Newbie
 
Registered: Aug 2010
Posts: 21

Rep: Reputation: 0
i can access php files without typeing extensions


Hi linuxquestions

I have set a Debian minimal 6 LAMP server up, and i have enabled mod_rewrite, but when i make a .htaccess file and write index.html i get a Error 404, but i can access the index.php without typeing the php extension, like http://domain/index

my .htaccess

Code:
Code:
RewriteEngine on
RewriteRule (.*)\.html $1.php
i hope some of you can help me with my problem

//Kasper Helsted
 
Old 09-07-2011, 05:31 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,903

Rep: Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611
Hi,

The rewrite should work.
Since you get a 404 error, you can check error_log to see what is the actual file apache tries to get.

Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache (PHP) access files outside of www root MartenH Linux - Newbie 1 05-02-2011 02:45 PM
[SOLVED] apache (running in Ubuntu 10.10) can't access php files W_Chevezman Linux - Software 12 02-24-2011 04:14 PM
[SOLVED] HTML/PHP access to files and hanging directory MTAS Programming 3 10-04-2010 06:16 PM
php-devel & PHP extensions EHCanadian Mandriva 0 06-23-2005 07:06 PM
After typeing 'startx' it can't find /dev/mouse smurcoch Slackware 10 05-15-2005 05:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration