Custom PHP File Extensions

3 posts / 0 new
Last post
#1 Mon, 06/21/2010 - 19:33
Alec

Custom PHP File Extensions

I'm trying to make a custom file extension.

I have all these .PHP files however, and I've been trying to figure out how to use this 'AddType' conf rule however, nothing works.

I looked at all the tutorials possible, no luck either. I was wondering maybe it might a Virtualmin setting that is disallowing me to change the file name.

I just want the .PHP's file be executed through .alec instead.

I know there is a way without even editing all the PHP files extensions to .alec, so how can I approach doing this without renaming the PHP files.

I already have a redirect match to redirect any .php link to .alec

Thanks, Alec

Wed, 06/23/2010 - 09:47
andreychek

Howdy,

Can you say a few words about the custom filetype you're trying to create?

For example, if the file is executable if you were to run it from the command line (ie, if there's a #!/foo/bar sort of line at the top), you could simply setup the filetype as a CGI file.

I don't think I'm familiar with alec files though, so I'm not sure if it's that simple...

-Eric

Wed, 06/23/2010 - 11:28
ronald
ronald's picture

eric, he is trying to execute php files named with a custom extension, like file.eric, without renaming the actual php files.

so i guess there should be a rule somewhere that displays file.eric when file.php is called.

Topic locked