Forum Moderators: phranque

Message Too Old, No Replies

FilesMatch just stopped working?

         

moheybee

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

10+ Year Member



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>

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

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!

Thanks!

jdMorgan

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

WebmasterWorld Senior Member 10+ Year Member



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.

Jim

g1smd

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

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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

moheybee

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

10+ Year Member



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

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