[Solved] Rewrite and Filesmatch

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

[Solved] Rewrite and Filesmatch

Postby oldjoe » 02. April 2008 11:49

Hi,

I am using a simple rewrite-rule in htaccess to rewrite dynamic pages with this syntax "index.php?page=pagename" into /pagename.

Now I am also trying to add password protection to pages with certain pagenames by using FilesMatch, like so:


<FilesMatch "^\custinfo">
AuthName "Enter password"
AuthType Basic
AuthuserFile "C:\htdocs\.passwd"
require valid-user
</FilesMatch>

But it does not seem to work. Can FilesMatch (or any other similar expression like Files or LocationMatch) be used to do this sort of thing in conjuction with rewrite?

Or does this behaviour needs to be written in php or otherwise?


EDIT: I apologize. Looks like I was a bit quick to turn the corner here.

I changed <FilesMatch "^\custinfo"> into <FilesMatch "^custinfo"> and now it seems to work fine. :D
oldjoe
 
Posts: 1
Joined: 02. April 2008 11:43

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 124 guests