homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

FilesMatch just stopped working?

 4:06 am on May 1, 2008 (gmt 0)

With my host I just was upgraded to Apache 1.3.41 (Unix) and PHP 5.2.5 (previously on 4.4)

This code just stopped working:

<FilesMatch ^(login)$>
ForceType application/x-httpd-php

<FilesMatch "^(activate)$">
SetHandler application/x-httpd-php

I had a company make a dynamic website for me with SEO URLs and this is how they decided to do it:
- a file called just "login" instead of "login.php"
- that file login accessible through myurl.com/login/ rewritten to that login php file as seen above

It was weird, but worked great until now.

Now when you pull up myurl.com/login/ it gets a 404
And when you pull up myurl.com/login (the file itself) it shows the php code like it's a text file.

Any thoughts? I'm pulling hair!




 6:07 pm on May 1, 2008 (gmt 0)

Note that the directive is <FilesMatch> and not <UrlMatch> -- The argument must match the name of a file, not a URL, whether rewritten or not.



 10:36 pm on May 1, 2008 (gmt 0)

Why is one in "quotes" and the other not?


 1:24 am on May 4, 2008 (gmt 0)

If anyone else should happen upon this, the line:
ForceType application/x-httpd-php

needed to be changed to:
ForceType application/x-httpd-php5

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved