httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Troy Moseley" <>
Subject RE: [users@httpd] URLRewrite Question
Date Sat, 03 Feb 2007 13:58:03 GMT

If all your client wants is to hide the fact that PHP is being used then
why not simply change the application-type line, ie.


AddType application/x-httpd-php .htm


Then you can use a rewrite rule to map html to htm. This way all calls
to .php extensions will result in 404 errors and your 'secret' is




From: Feris Thia [] 
Sent: Friday, February 02, 2007 8:46 AM
Subject: Re: [users@httpd] URLRewrite Question


On 2/2/07, Krist van Besien <> wrote:

	RewriteRule processing doesn't stop when a rule matches, unless
	tell it to. So you first rewrite *.html to *.php and then tell
	server to forbid access to *.php, and you get exactly that.
	First a question: Why do you want to do this? This will cause
	kinds of trouble, like when a piece of php generates self
	urls, that will naturlally end in .php. Forms for example work

Hi Krist,

It is requested by my client as he doesn't want client to guess the
scripting engine that being used. And how do I forbid the php extension
access while stil can map html to php extension ?


	What you can do however is: 
	- Play with the order of the rules.
	- Add the [L] flag to stop processing.

Hm... can you please give me an example ? I'm quite frustrated with this


Many Thanks...



View raw message