Web Hosting Talk







View Full Version : Your Own Extension


Blake M
09-04-2007, 11:12 PM
Hello, I have seen some sites with there own like php extensions. I have see stuff like .pz, and .lt and Its a php script still. Is there some way that people can mask the .php and replace with there own?

bear
09-04-2007, 11:18 PM
In .htaccess:
AddType application/x-httpd-php .pz .lt

Blake M
09-04-2007, 11:20 PM
dident seem to work, maybe I did it wrong

ThatScriptGuy
09-04-2007, 11:26 PM
If you're running apache, that .htaccess code should work.

Some hosts might have it set up as something like application/x-httpd-php4

Kevin

bear
09-05-2007, 06:56 AM
Try it with just the one extension in the line. ".pz"

Blake M
09-05-2007, 07:04 PM
Well its my server, and my htacess is empty so does that make any diference? But I put this in AddType application/x-httpd-php4 .wz .pz .lt and it dident work. I got a no index.php found error

Bangalore Job Mob
09-05-2007, 07:18 PM
Well if you renamed index.php to index.pz then there is no index.php anymore.

bear
09-05-2007, 08:30 PM
I got a no index.php found error

You get that when you type in the page name itself, or just open a directory containing nothing but your "wz" page? Add this on it's own line:
DirectoryIndex index.wz index.php index.html index.htm

You could use anything as the "index" page; ie: "bob.rtm" if you like, as long as you let the webserver know how to process it, and what file to expect/deliver when just the directory is called. :D

Renard Fin
09-06-2007, 12:14 AM
Dont forget also on your httpd.conf that you need to set AllowOverride All or it wont work.

Blake M
09-06-2007, 12:27 AM
ah ok got it, thanks guys!