LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 04: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, 05: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, 05: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, 06:05 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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, 06: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 01:52 AM. Reason: /* FIXED */
 
  


Reply



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

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

All times are GMT -5. The time now is 07:13 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
Open Source Consulting | Domain Registration