Jump to content

php html?


corillo181

Recommended Posts

i was looking at some one page that i know is made with php but the extension is html.

and all the files show html in the browser but they are php in the folders.

 

is this done with mod rewrite?

 

if so how would i do to get all the file in my site and change the php to html

 

thanks for any help.

Link to comment
Share on other sites

i was looking around and i saw that it can be done with a htaccess file but i think it say i have to put it in every director yin order to work..

wouldn't be the same as making a single one and include it?

 

i try looking at htaccess and tried it out and it works for a few things, but not to change my .php to .html

 

edit: i found something that works is ForceType application/x-httpd-php in a .htaccess file, but now i dont want to change all my files to html :| my whoel site is done with .php extension.

Link to comment
Share on other sites

I do the same thing on some of my older sites...

 

I went to change them to PHP but didn't want to change all of the extensions and lose SE Rank..

 

So I used::

 

AddHandler application/x-httpd-php .html

 

In my .htaccess and now all of my HTML pages act like PHP pages...

 

But if your page extensions are already PHP it is probably best to leave it alone.. 

the SE's spider PHP pages pretty well as long as your URLS do not contain too many:

?variable=1&variable=2&variable=3&variable=4

Link to comment
Share on other sites

edit: i found something that works is ForceType application/x-httpd-php in a .htaccess file, but now i dont want to change all my files to html :| my whoel site is done with .php extension.

 

It doesn't matter

if its not in the php brackets

<?php

?>

then the server will just send the output straight to user with a microsecond of extra time.

Link to comment
Share on other sites

well I know 1&1 hosting has a .htaccess or apache mod that says if file isn't found try and find a file with the same name different extension.

 

You can rename all your php files .htm and just set your system to phrase .htm files as that but saying if a user goes to index.htm and then load index.php is a bit more complicated unless its always an extension rewrite

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.