View Full Version : Use index.php as main index file
huffmancs
03-15-2006, 01:42 AM
I would like to use the index.php in place of my index.html file. How can I do this? The server I run on is Apache.
Optimit
03-15-2006, 01:52 AM
You have an index.html? My copy didnt come with one. :cry:
Kevuk2k
03-15-2006, 01:55 AM
Content visible to registered users only.
Is this the answer?
Add a couple of lines to your .htaccess file:
DirectoryIndex /index.php
Redirect /index.html yourdomain.com/path to/index.php
Be sure to edit that last one.............
Kev
huffmancs
03-15-2006, 02:04 AM
I did look up information about using the .htaccess file, but I do not know where it is at. My assumption is that the file resides on the server. Using a hosting service, I don't have that access, unless they make the change.
Will robot still find the site properly?
To the other reply, no it does not come with and index.html. I created one that does nothing but redirects to the index.php file.
Kevuk2k
03-15-2006, 02:16 AM
Content visible to registered users only.
Try this link please, should help.
http://www.thesitewizard.com/archive/php4install.shtml
Kev
huffmancs
03-15-2006, 02:27 AM
Thanks, I appreciate the help. I'll take a look at this site and fix it up.
Just wondering, the way I am using my site I do not require the URL to be checked. Actually this is going to be more of a directory for VoIP and contact information. I would still want the field required, but it is going to be used as an ID field. Where is the code I need to remove so it does not go out the check for a valid URL?
Just wondering if you would know. From my readings, you seem to be the man when it come to the PhpLD code. Thanks again for your time.
Kevin
Kevuk2k
03-15-2006, 02:40 AM
:lol: I'm not the man who knows phpld, thats the job of others. I will only give you answers to questions I know about "Voice over Internet Protocol" and the like and I know where to search but as for the script here thats better put before the forum AFTER checking to ensure the post hasn't been already listed. Use the search at the top of the page.
In saying that if there is anything I can do to help your use of the script don't hestitate to ask as we at the phpLD are here to help!
Kev
hrmmm... ever just thought about adding php parsing to your .html files via .htaccess?
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
then in your .html file, all you need to do is enclose your php script.
ex. <?php echo"This is my php in html"; ?>
and it should parse/work.
There are other variables involved, and if you try this method with success then all is fine. If you try this method and have problems, then there are a few settings i know that need to be checked via your hosting path (cgi) and httpd.conf etc..
Give it a try and see.
Rob
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.