PDA

View Full Version : import vb features onto .html page


JustAskJulie
11-21-2002, 09:16 PM
There are a lot of great hacks on here to allow you to use many of the Vb features on your home page, butwhat I'm seeing is that most of them require you to change your index.html page to index.php

Are there any hacks that allow you to
- allow users to login/logout
-show recent posts

on your homepage without convering your homepage to .php?

DrkFusion
11-21-2002, 09:35 PM
you can always use a .htaccess file and have .html use php code :)

JustAskJulie
11-22-2002, 01:04 AM
What would the line in the .htaccess file look like to allow that?

Logician
11-22-2002, 09:22 AM
Originally posted by JustAskJulie
What would the line in the .htaccess file look like to allow that?
Redirect /index.html http://www.yourdomain.com/index.php

Please notice that this solution still requires you to rename your index.html page to index.php but your visitors would be able to visit it even if they entered the url http://www.yourdomain.com/index.html

Btw. there is nothing you should be scared of about converting your .html file to .php :) You dont even need to replace its contents, .php files can include and display HTML.. Just rename the file and you'll be fine..

Tigga
11-22-2002, 11:22 AM
You could also use SSI to include the PHP file(s) where you wanted them, though you would still have to modify your .htaccess file to allow including of PHP files.

JustAskJulie
11-22-2002, 05:35 PM
Thanks Plur, that was going to be my next question. I'm not concerned about editing my .htaccess, I can deal with that....

My biggest concern is SE indexing. My site currently ranks really well and I don't want to do anything to screw that up.

Erwin
11-22-2002, 09:10 PM
SE indexes php as well as html extensions, as long as there are not extra variables eg. ?s=3249203470 at the end. My site ranks number 1 and 2 for my keywords. :)

JustAskJulie
11-23-2002, 03:27 PM
I know they index it, my concern was/is over redirecting to a new page. Will the SE's see that redirect and think it's spam and drop my listing because of it. I know if it was a meta redirect they would, but I'm thinking with it being a .htaccess redirect they won't even notice.

Blue Moose Aaron
11-25-2002, 03:13 AM
You could always edit your mine types to parse html files for PHP

JamesUS
11-25-2002, 06:32 PM
The line you need to add is something along these lines...

AddType x-httpd-php .html

However I can't remember the exact syntax...do a search or read the Apache manual on 'AddType'.

JustAskJulie
11-25-2002, 08:09 PM
I ended up just using SSI to call the php files into my .html doc and it worked fine.