LinuxQuestions.org
Help answer threads with 0 replies.
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 04-18-2011, 05:54 PM   #1
Helstedxd
LQ Newbie
 
Registered: Aug 2010
Posts: 21

Rep: Reputation: 0
apache and php, force file extension


Hi Everybody

I am playing with my LAMP server, and i need some help...

1. why can i access a php file on the server only by typing http://serverip/file with no .php extension on?

2. later i tryed to play with .htaccess, but when i uploaded it to the server it just disappeared, why is that?

//Kasper Helsted
 
Old 04-18-2011, 06:12 PM   #2
backblaze.pl
LQ Newbie
 
Registered: Apr 2010
Distribution: Slackware
Posts: 23

Rep: Reputation: 6
Hi,

Try to play with your browser to read server documentation at httpd.apache.org. You may start here: http://httpd.apache.org/docs/2.2/mod...tml#filesmatch and consult your httpd.conf's file FilesMatch section mentioning:

<FilesMatch "^\.ht">

Have a nice reading!
 
Old 04-18-2011, 06:52 PM   #3
Helstedxd
LQ Newbie
 
Registered: Aug 2010
Posts: 21

Original Poster
Rep: Reputation: 0
.htaccess is missing in the FTP i mean
 
Old 04-18-2011, 07:05 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
In Unix, a file that starts with '.' is a 'hidden' file. To see it, you need the -a flag for ls ie

ls -a
 
Old 04-18-2011, 07:07 PM   #5
Helstedxd
LQ Newbie
 
Registered: Aug 2010
Posts: 21

Original Poster
Rep: Reputation: 0
/* fixed */

Last edited by Helstedxd; 04-19-2011 at 02:52 AM. Reason: /* FIXED */
 
  


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
.php file-extension problem on apache2 membit Linux - Server 11 11-06-2008 06:55 AM
How to force apache To reload it's conf file????? ral0r3us Programming 2 07-30-2008 07:41 AM
How write linux make file for php extension Janehe Programming 0 08-23-2006 04:32 PM
Apache URL addition of .php extension thetawaverider Linux - Software 1 05-08-2006 02:28 AM
Apache/PHP extension making. Unknown symbol _Unwind_Resume problem. TimeSaver Linux - Software 1 03-20-2003 06:31 PM


All times are GMT -5. The time now is 10:45 AM.

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