PHP - HTML
am 23.10.2007 16:19:12 von GalatorgIs there a way to have .php extensions show as .html extensions on the
internet. Some sort of rewrite?
Is there a way to have .php extensions show as .html extensions on the
internet. Some sort of rewrite?
"Lamer"
news:1193149152.826242.45170@q3g2000prf.googlegroups.com...
> Is there a way to have .php extensions show as .html extensions on the
> internet. Some sort of rewrite?
Why?
Lamer wrote:
> Is there a way to have .php extensions show as .html extensions on the
> internet. Some sort of rewrite?
>
>
You could, but setting up your server to parse .html files as PHP.
However, this will create a lot of overhead on the server unnecessarily
parsing non-html pages.
But if you want to know how to do it (and why not to), try
alt.apache.configuration (assuming you're using Apache, of course).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
On 23 Oct, 15:19, Lamer
> Is there a way to have .php extensions show as .html extensions on the
> internet. Some sort of rewrite?
Yes,
this is what OpenSEF does with Joomla URLs
On Oct 23, 3:19 pm, Lamer
> 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
In article <1193149152.826242.45170@q3g2000prf.googlegroups.com>,
Lamer
> Is there a way to have .php extensions show as .html extensions on the
> internet. Some sort of rewrite?
Probably easiest with Apache's MultiViews (assuming you use Apache, that
is ;)). See
But note that there are good arguments to not have filename extensions
in URLs at all. See
--
Sander Tekelenburg
The Web Repair Initiative: