Forum Moderators: open

Message Too Old, No Replies

Should I change to SHTML for my menus

         

reddevil

4:43 am on Feb 24, 2004 (gmt 0)

10+ Year Member



I am thinking about changing all the menus on my site to SSI and therefore will have to rename my pages with shtml extensions.
If I do this, does it mean that I will have to resubmit to all the SE's and link partners again? Or that all sites where I am currently listed (including dmoz) will have to be informed and updated? Gulp!

isitreal

6:11 pm on Feb 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Don't do that, you can use php much more easily, assuming you have a *nix server that supports it, then you can just add this to the .htaccess file:

AddType application/x-httpd-php .htm .html

That will run all your .htm or .html pages as php files, php is much more useful than SSI, which are very limited.

To add a menu with php, for example, you first have to set your include folder path, in .htaccess again, like this:

php_value include_path ".:/usr/www/yourhostusername/yoursite/includes"

then to include the menu you would just put this in your page:

<?php include("menu1.htm");?>

and it would be there.

I think you can also set html files to act as shtml files in the same way, but I've never done it so I don't know the .htaccess syntax for that.

vkaryl

9:56 pm on Feb 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Wow. Amazes me how much great stuff I learn just surfing around different subjects here!

Thanks isitreal - you just made my day!

isitreal

10:24 pm on Feb 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Good to hear it, glad that was useful to you.

On .htaccess files, make sure that you always hit enter after the last line of the file or you can get a really serious error, in other words, the cursor needs to be on the line under the last line when you save it, also make sure to save it as .htaccess or it won't work.

I wish I'd known that technique when I started, it would have made a lot of stuff a lot easier.

BarkerJr

1:57 am on Feb 27, 2004 (gmt 0)

10+ Year Member



Also, so that you don't need to use the extensions in the URLs at all, W3C suggests using 'Options +MultiViews'. That way, you can set the extensions to whatever you want without breaking links.

I don't know how well search engines like it, but Google doesn't seem to care.