faqts : Computers : Programming : Languages : PHP : Common Problems : Tips and Tricks

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

26 of 30 people (87%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

How can I show .phps PHP source files without having a .phps file for each .phtml file?

Mar 12th, 2000 18:47
Suso Banderas,


Under the Apache webserver you can use mod_rewrite to do this.
Simply enable mod_rewrite and then enter the following rewrite rule:

RewriteRule (.*)\.phps $1.phtml
[PT,NS,T=application/x-httpd-php3-source]

 Doing this is useful if you want to let anyone see the source to your
PHP script, but without copying each script file to .phps or making
symbolic links.