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

November 2025

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526 2728 29
30      

Links

Syndicate

RSS Atom

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated 14 December 2025 01:34 am
Powered by Dreamwidth Studios