mysty Posted December 31, 2006 Share Posted December 31, 2006 My hosting company's tech support told me that I could upgrade from PHP 4.4.4 to PHP 5.2.0 on their server, but I had to do one of the following:1) rename all my files from *.php to *.php5or2) Create a .htaccess file and place the following line AddType x-mapp-php5 .php in it.Since I don't want to rename all my file extensions, I would like to try option (2), but I am not sure what that means. I tried to make a file named ".htaccess" and I tried one named "something.htaccess" and I tried ".htaccess.php" but none seemed to work. What am I missing? Link to comment https://forums.phpfreaks.com/topic/32393-htaccess-file/ Share on other sites More sharing options...
emehrkay Posted December 31, 2006 Share Posted December 31, 2006 one and one?this is what i had to doAddType x-mapp-php5 .phplocally i saved it as _.htaccess then when i uploaded it, i canged the name to .htaccess Link to comment https://forums.phpfreaks.com/topic/32393-htaccess-file/#findComment-150428 Share on other sites More sharing options...
PFMaBiSmAd Posted December 31, 2006 Share Posted December 31, 2006 Windows cannot create or rename a file that starts with a dot, but you can edit an existing file by that name. Either find an existing .htaccess file and edit it with your desired contents, or you can create a file with some other name/extension and use PHP to rename the file -[code]<?php$source = "htaccess.txt";$dest = ".htaccess";rename( $source, $dest) or die("could not rename");?>[/code] Link to comment https://forums.phpfreaks.com/topic/32393-htaccess-file/#findComment-150431 Share on other sites More sharing options...
mysty Posted December 31, 2006 Author Share Posted December 31, 2006 Yes, one and one.I found my problem. Notepad was renaming the file to .htaccess.txt. Once I saved it as .htaccess.txt, I just renamed it and all is well. Link to comment https://forums.phpfreaks.com/topic/32393-htaccess-file/#findComment-150433 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.