about the age-old quest for abstraction layers and portability
In building my little web site, I was enviously admiring how some designers are able to hide .php extensions, make some of their dynamic pages eaily spiderable and use abstration layers to be able to move their web sites easily between ISP's.
The little prodding I did so far revealed that a lot of this seems to involve phpLib or similar.
My newbie question is : Is there a way to easily mask your 'index.php' so that the person who logs on to your site sees either index.html or a customized URL rather than 'http://yoursite.com/index.php', and further make the 'http://www.yoursite.com/script.php?action=data'into something that is more search-engine friendly, but doesn't require to read the complete space shuttle operating amnual?
I just did a redirect from my index.html to index.php, and it works, but I tought there perhaps would be a more elegant way.
is that in the httpd.conf file??
Are you saying that this directive to parse .html as .php should be in the .conf file for Apache, at the part where you tell it how to deal with .htaccess??
Or is this in the .htaccess file itself?
If I understand, you are saying I should rename my index.php file to index.html and it the <?php code ?> will be parsed correctly because the web server will know?
Also, when you do this, can it be directory-specific, or for the whole host? (I don't have virtual hosts yet)
Curious...
Re: is that in the httpd.conf file??
Quote:
Originally posted by frankie54
Are you saying that this directive to parse .html as .php should be in the .conf file for Apache, at the part where you tell it how to deal with .htaccess??
Or is this in the .htaccess file itself?
Quote:
Originally posted by seanf
To make Apache parse .htm files as PHP files add the following to a .htaccess file:
AddType application/x-httpd-php .htm
Re: is that in the httpd.conf file??
Quote:
Originally posted by frankie54
Also, when you do this, can it be directory-specific, or for the whole host? (I don't have virtual hosts yet)
If you put it in the root of your account all .htm files will be parsed, if you put it in a sub-directory only the .htm files in that directory and ones under that will be parsed
Sean :)