Apache ignores file extensions

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Apache ignores file extensions

Postby mau » 19. July 2005 19:16

After spending many hours debugging a simple htaccess file, I have discovered that Apache doesn't care about file extensions any more. Going to localhost/mypage is the same as going to localhost/mypage.php, or localhost/mypage.js. Whatever it can find.

How do I disable this? There is no htaccess file that is doing this for me.

Additionally, I think maybe related, is that aliases stopped working. I used to go to localhost/phpMyAdmin to enter phpMyAdmin which is stored outside of the htdocs folder. That started giving me a 404 the other day, so I just moved it inside the htdocs folder.

Also, going to localhost/mypage/something is the same thing as going to localhost/mypage

So, how can I add back in aliases and add back in the requirement for file extensions?
mau
 
Posts: 6
Joined: 29. June 2005 06:33

Postby alucard01 » 24. July 2005 13:15

Actually, what is your "mypage"? Is it a folder, a .js file, a .php file or other things?

You may find the following directive of apache suit you:

http://httpd.apache.org/docs/1.3/mod/core.html#files

By the way, I found the following directive in xampp httpd.conf:

Alias /webalizer "C:/xampp/webalizer/"

<Directory "C:/xampp/webalizer/">
Options Indexes MultiViews ExecCGI
AddHandler cgi-script .cgi .exe
Order allow,deny
Allow from all
</Directory>


It may help...

For your 2nd question, you are of couse not able to access phpmyadmin unless you put phpmyadmin under htdocs. However, if you don't want to put it under \htdocs, you can use the above "Alias" directive to map your phpmyadmin to other place.

Hope the above helps...
alucard01
 
Posts: 122
Joined: 15. May 2005 13:51

Postby mau » 25. July 2005 23:49

mypage can be anything, let it be about, contact, help, etc. And no, there is no folder that goes to the page name.

I think this must be a bug in Apache. I have searched around forever, asking many different people. The only suggestions I get are to "make sure there is no htaccess file" :roll: :)
mau
 
Posts: 6
Joined: 29. June 2005 06:33

Postby Wiedmann » 26. July 2005 00:05

Which XAMPP did you have? Maybe your problem have something to do with MultiViews enabled for the directory.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby mau » 27. July 2005 03:32

The latest version (not lite). I believe 1.0.14. Also, it's for every directory within the htdocs folder.

How would I turn multiviews off?

Thanks!
mau
 
Posts: 6
Joined: 29. June 2005 06:33

Postby Wiedmann » 27. July 2005 11:08

In the "httpd.conf", change line ~353 to:
Code: Select all
    Options Indexes FollowSymLinks Includes ExecCGI

(remove "MultiViews" from that line)

Restart Apache.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby mau » 27. July 2005 18:48

Yes, that's exactly what I want! Thank you very much!
mau
 
Posts: 6
Joined: 29. June 2005 06:33


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 65 guests