Jump to content

.htaccess file


mysty

Recommended Posts

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 *.php5
or
2) 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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.