Web Hosting Talk







View Full Version : Changing PHP to HTML dynamically...


kenfused
07-28-2003, 07:58 PM
ello,
I'm trying to get some PHP files to be auto converted to HTML, [ REally, trying to get .html files when called to run a PHP script, and return the output as .html] using the method 1 on:
http://www.thesitewizard.com/archive/dynamicstatic.shtml

I made an httacess file as:

RewriteEngine on
RewriteBase /test/
RewriteRule ^pagename\.html$ index.php [T=application/x-httpd-php]


this file I put in www.myserver.com/test
Then I put in a generic index.php file and when I point my browser to:

http://www.myserver.com/test/index.php
I am expecting a page with "index.html"
However, I get:

"Forbidden
You don't have permission to access /test/index.php on this server.
Apache/1.3.27 Server at www.myserver.com Port 80"


When I try to access www.myserver.com/test/index.html (hoping to get it to really display "index.php" which I had uploaded, I get:

"Forbidden
You don't have permission to access /test/index.html on this server.
Apache/1.3.27 Server at www.myserver.com Port 80"

I guess the Rewrite is not occuring...

I have tried to CHMOD the .htacces file to 0777, but not luck..
Any ideas?
Thanks

Rich2k
07-29-2003, 04:54 AM
I don't really understand why your trying to do it that way?

Why not just upload index.php and call it from the browser and forget about the .html file

ciqala
07-29-2003, 11:34 AM
he may be trying to get google to index his whole site as google is pretty bad at crawling php sites

LiveRack
07-29-2003, 04:05 PM
Originally posted by ciqala
he may be trying to get google to index his whole site as google is pretty bad at crawling php sites

Google really doesn't care if it's .php, .html, .cgi, .htm. If it detects that txt/html is the format that's being sent, it will index it.

The thing Google doesn't like is multiple variables in a GET method (like www.mydomain.com/page.php?name=John&record=455&query=38838383).

kenfused
07-29-2003, 04:54 PM
I think I want to do more of what's on:

http://www.webhostingtalk.com/showthread.php?s=&postid=1344581#post1344581

To save server loads, and be able to save product pages locally would also be nice...
THX

Rich2k
07-29-2003, 05:28 PM
Originally posted by nacs
Google really doesn't care if it's .php, .html, .cgi, .htm. If it detects that txt/html is the format that's being sent, it will index it.

The thing Google doesn't like is multiple variables in a GET method (like www.mydomain.com/page.php?name=John&record=455&query=38838383).

Some search engines have problems with query strings, however google DOES list pages with query strings