Reply to Re: PHP include and changing page names

Your name:

Reply:


Posted by Safalra (Stephen Morley) on 11/11/07 21:13

On Sun, 11 Nov 2007 15:45:27 -0500, Ed Mullen wrote:
> I'm considering using PHP to include the menus on my Web pages. I've
> tested it and it works fine (even though I know next to nothing about
> PHP). My understanding is that the page that will import content using
> a PHP include must have a .PHP extension. Which means that all my page
> names (which now end in .html) will change. Which means that the search
> engine results will point to non-existent pages.


Does your host allow you to use .htaccess files? If they do, you can either
allow PHP to process .html files, or use URL rewriting. If using the second
option, consider rewtiting URLs to end with a slash and then internally map
to the correct script - this hides the technology from the user and allows
it to change at a later date without complication.


If you can't use .htaccess, one trick to to take advantage of the rules
most servers use by default, and for each URL of the form:

http://www.example.com/somewhere/something.html

....replace the HTML file with a PHP file here:

http://www.example.com/somewhere/something.html/index.php

....where 'something.html' is now a directory.


--
Safalra (Stephen Morley)

The 'white-space' Property In CSS:
http://www.safalra.com/web-design/css/white-space-property/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация