View Full Version : .htaccess
prozak76
01-05-2004, 09:02 PM
Is there a script I can put in my htaccess file to run .html as PHP. I can not rename my pages as .php because there is a problem with my current web server. It does nt allow me to do so. I have seen a line that looked something like this:
AddType application/x-httpd-php .php .php3 .phtml .html
Will that work?? Is there something else?? I am really going crazy trying to get this to work.
Kozak Family Web Site (http://www.kozakfamilyonline.com)
leoo24
01-06-2004, 02:25 PM
hehe you can use that line yes, although you may only need:
AddType application/x-httpd-php .php .html
:)
If you can't run PHP scripts as .php files on your server, then I'm guessing that they don't have PHP installed at all. In that case, the above line will also do nothing.
prozak76
01-06-2004, 07:45 PM
They do have php installed. I have verified that with them. They are at a loss too. They said I should be able to actually just rename the index page to php. I am about to drop them, only problem is I paid for a year up front with them and it has only been about 4 months. I need help. This is a very important part of my web site. Anyone with any other ideas PLEASE feel free to give your input.
Thanks!
Kozak Family Web Site (http://www.kozakfamilyonline.com)
leoo24
01-07-2004, 12:32 PM
did that line in the .htaccess not work then?
Using your FTP program, you should be able to rename index.htm as index.php but if it doesn't work then maybe the host has the wrong permissions set up for the filesystem.
You should be able to download the index.htm file using FTP, rename it as index.php on your system, and then upload it back to the webserver. Don't forget to delete the index.htm copy once you have directly accessed the index.php version and verified that it was actually working.
splitserver
01-09-2004, 01:24 PM
try creating a phpinfo page to verify php's existance on the server.
create a file called phpinfo.php
inside have the following:
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);
?>
P.S. next time don't pay for a year with a host. Especially one who doesn't know how to use php!
leoo24
01-09-2004, 01:49 PM
Originally posted by splitserver
create a file called phpinfo.php
he said he can't rename his pages with the .php extension, not sure if he can upload them or not, i imagine not.
i've checked his server and it is running PHP 4.3.2 ?
havent a clue what the host is up to, who are they by the way,i can only find out the datacenter and the other sites hosted on the server but not the host itself :)
prozak76
01-09-2004, 03:04 PM
I am able to create the phpifno page. It is only a problem with renaming index.html to index.php. I am at a loss.
Oh yeah by the way the web host is IPowerWeb. They were really good, until this problem came about. I am getting really crappy tech support on this one.
leoo24
01-09-2004, 03:13 PM
hehe, i have my own views on ipowerweb but i won't go into that now.
i'm somewhat confused,
can you upload .php to the server?
splitserver
01-09-2004, 03:20 PM
so your telling us that if you take the same code from index.html, and save it as index.php that the file won't parse? I find it hard to believe if you are able to run phpinfo.php.
Or is this an issue of having a index.php as an index page instead of index.html?
Are you getting an error when you access yourdomain.com when you have index.php instead of index.html?
leoo24
01-09-2004, 03:43 PM
i was thinking that, does he want to change the indexing order of the default page?
prozak76
01-09-2004, 03:58 PM
I am trying to rename the index.html page, which is what you get when you go to our homepage to index.php so that I can run a php script on it. It will not work.
I am really new at this stuff.
prozak76
01-09-2004, 06:23 PM
It is finally working like I wanted. Nothing was added to .htaccess file. I am not even sure what "They" did. They being the host. I can not find anything diffrent in any of my files. Evidently they had something wrong on the server or something. Any way it is working now. Thank you to everyone who attempted to resolve my problems. I appreciate it a lot.
Thanks!
leoo24
01-10-2004, 11:20 AM
glad it's working, normally you should just be able to rename it through ftp or ssh.
But anyway, well done :) and good luck with them!!
vBulletin® v3.6.7, Copyright ©2000-2010, Jelsoft Enterprises Ltd.