adric: (Hacker)
Whats this do? ^([^.?]+)$ Or rather, how does it do it, and why wouldn't something simpler work, like ^(.+)$ ?

in:
RewriteEngine on
# Rewrite /foo/bar to /foo/bar.php
RewriteRule ^([^.?]+)$ %{REQUEST_URI}.php [L]
# Return 404 if original request is /foo/bar.php
RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.php[? ].*$"
RewriteRule .* - [L,R=404]
from: http://us2.php.net/manual/en/security.hiding.php#72630

my guessing, so far )

Profile

adric: books icon (c) 2004 adric.net (Default)
adric

June 2025

S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930     

Links

Syndicate

RSS Atom

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated 13 July 2025 05:02 am
Powered by Dreamwidth Studios