You have to create a "fake extension". I suggest you use a framework like codeigniter that has this method built in. But if you wish to build one yourself - study how they do it.
You can modify the ending that is shown in the URL using your .htaccess file using rewrites like so:
Code:
RewriteEngine On
RewriteRule ^([A-Za-z0-9]+).php$ $1.htm
This will run .php extensions in your browser as if they were .htm. You can also use your .htm or .html files as PHP files (without URL manipulation) like this:
Code:
AddType application/x-httpd-php .html .htm
.
More on the above method: http://www.besthostratings.com/articles/php-in-html-files.html
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.