I was wondering how to display php on a html page? My site has a php backend doing all the work, html to make it look good. I'm trying to display a chat box which is coded in php on my html header page.

JayGeePee
Recommended Answers
Jump to PostOr use URL Rewriting.
.htaccess
RewriteEngine On RewriteRule (.*)\.html $1\.php [L]
This will make the browser think the document is .html but instead the server looks for .php.
Jump to PostYes this should be in a .htaccess file by the way.
RewriteEngine On RewriteRule ^chatpage\.html chatpage\.php [L]
Will work on the document named chatpage.php and you can access it by the chatpage.html.
Just change the chatpage on both sides for whatever you document name is.
All 5 Replies
nquinlan 0 Newbie Poster
Froger93 1 Junior Poster in Training

JayGeePee
Froger93 1 Junior Poster in Training
kylegetson 16 Junior Poster in Training
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.