LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-23-2011, 12:38 PM   #1
sysctl
LQ Newbie
 
Registered: Jul 2011
Posts: 5

Rep: Reputation: Disabled
apache2 loads pages w/o php extension


Hi,

I have apache2 webserver installed on client's dedicated server running Debian Squeeze distro. We have many domains directed to that server and we had installed many PHP-based applications, such as Wordpress.

Now to the problem: apache2 loads *.php scripts without the "php" extension. I don't know if this is some kind of PrettyURLs addon to the apache2 webserver, it was already installed when I've started managing the server. We need to get rid of that, because it mess up all the scripts. For example: if I'll try to load [someurl]/wp-login , then it loads the wp-login.php script. If I'll try to load [someurl]/wp-login.php, the wp-login.php is still loaded.

How can we get rid of that? I have already checked apache2.conf for AddType line, but it is not even there.

Thanks.
 
Old 07-23-2011, 01:39 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,
Quote:
Now to the problem: apache2 loads *.php scripts without the "php" extension. I don't know if this is some kind of PrettyURLs addon to the apache2 webserver, it was already installed when I've started managing the server.
This looks like a mod_rewrite stuff. So if you don't know how wordpress was installed at a first place, look at the apache config file(s) or at a .htaccess file for the mod_rewrite directives

Regards

Last edited by bathory; 07-23-2011 at 01:52 PM.
 
Old 07-23-2011, 02:49 PM   #3
sysctl
LQ Newbie
 
Registered: Jul 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi,

This looks like a mod_rewrite stuff. So if you don't know how wordpress was installed at a first place, look at the apache config file(s) or at a .htaccess file for the mod_rewrite directives

Regards
This applies for all domains containing PHP files, Wordpress was only an example. Is there any general .htaccess file that applies for all VirtualServers? I've looked into apache2.conf but AddType directive is not even there.

Aditionally, I have disabled mod_rewrite - it responds that mod_rewrite already disabled, but the problem is still there

Problem solved. It was mod_rewrite. In domain config (sites-available) was directive 'MultiViews'

Thanks.

Last edited by sysctl; 07-23-2011 at 03:32 PM.
 
  


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
Apache2 is serving PHP source files unless called without the extension rjlee Linux - General 3 12-08-2006 06:17 AM
HELP! Apache2 and php pages hoiatl Linux - Server 1 10-24-2006 07:21 AM
Suse 9.3/apache2/php4 - Firefox tries to download index.php, other *php pages work stefanlasiewski SUSE / openSUSE 1 01-18-2006 06:12 PM
My Apache2 fails to parse php-scripts in html pages 3-1415 Linux - Software 6 10-21-2004 05:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:09 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