I am trying to serve up some PHP files as extension-less or as custom extensions
(e.g. test.myfile1).

This is my current .htaccess:

#AddHandler application/x-httpd-php .$
RewriteRule ^([^\.]+)$ $1 [T=application/x-httpd-php-source]

Previously it was:

AddHandler application/x-httpd-php .$

Which is better, and how should I go about this?

Thanks

Not sure about the better part, but the AddHandler was made for this (telling Apache what to do with a certain file).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.