|
Posted by Vladimir Ghetau on 10/23/07 17:00
On Oct 23, 3:19 pm, Lamer <Galat...@gmail.com> wrote:
> Is there a way to have .php extensions show as .html extensions on the
> internet. Some sort of rewrite?
Yes, it can be done two ways:
option one) without renaming the PHP files to .HTML
add this to your htacccess (called url rewriting):
# -----------------------
RewriteEngine on
RewriteRule ^(.*).html$ $1.php
# ------------------------
Note this is a basic example, just to put you on track, if you want to
play with mod_Rewrite apache feature, I suggest, you should search
deeper.
Option two) by renaming the PHP files to HTML (playing with mime
types)
#-----------------------
AddType application/x-httpd-php .php .html
#-----------------------
add this to your .htaccess apache specific file
Now, these examples are for apache, hope they help, if you're using
other HTTP server, go study their documentation, I remember lighttpd
has a mod_rewrite feature also.
Cheers,
Vladimir Ghetau
http://www.Vladimirated.com
[Back to original message]
|