views:

46

answers:

2

Hey,

When a user requests a page that ends with .php, I want to send them a 404 error even if the page exist. Is that possible to do with .htaccess/mod_rewrite??

http://mysite.com/whatever.php

+4  A: 

Haven't tested this, but it's something like:

RewriteRule \.php$ - [R=404]

Note: The Added Bytes mod_rewrite cheat sheet is a useful resource to have handy.

Rob
thank you very much
Don’t forget to escape the dot.
Gumbo
Whoops, always forget that one.
Rob