Author Topic: Static pages  (Read 2301 times)

0 Members and 1 Guest are viewing this topic.

NickM

  • Guest
Static pages
on: Tue, 16. September 2003 - 14:10:41
Perhaps more a PHP question but...
Can I use vLib to create static pages?
I ask because I would like to create *.html pages rather than *.php to help with listing on search engines (unless you know of another method to improve search engine listing)
I have created a site using php, mySQL and vLib for ease of management but the pages don't change all that often so I'm thinking about converting it somehow to HTML while retiaining all the coding for easy updating.

releasedj

  • Guest
Static pages
Reply #1 on: Thu, 18. September 2003 - 15:14:37
I don't know if having an .php extension actually hinders your search engine listings.

Anyway, perhaps you can just force your webserver to handle .html files as PHP. That was you can use PHP code in your HTML files. On the flip side any normal static HTML pages will also be parsed by the PHP engine, but the performance hit will probably not be noticable.


Kelvin

Offline ClausVB

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
    • Homepage: clausvb.de
Static pages
Reply #2 on: Fri, 19. September 2003 - 23:54:02
Quote
I dont know if having an .php extension actually hinders your search engine listings.

Regarding bad PHP-search-engin I heard rumors, too, but imho the rumors are not true.

- go to google
- enter "Template engine site:php-coding-standard.de" and search

You will find my PHP site: "php_template_engine.php" (as you can see extension: "*.php")

If you really want to just put out static code (I would not recommend it), you could use

tmpl->grab();

Regards,
Claus
Last Edit: Sat, 20. January 2007 - 13:38:58 by ClausVB

NickM

  • Guest
Static pages
Reply #3 on: Sat, 20. September 2003 - 05:43:32
Perhaps it's worth doing both - running the php and creating static pages.
The php/vLib/mySQL coding has been done, so creating the static pages should be easy.
I am suggesting creating the static pages and having them available only to search engines. In other words they exist on the server, the spiders can index them, but the pages are not available to the visitor (there is no link to the static pages from the web site).
Now all I need is some instructions to create the static pages (they only need to be created once and there is no need to have them updated - they are only there in the background for the search engine).
I'll have a look at tmpl->grab();
But if someone has already done something similar, I'm open to any shortcuts :wink:

wakko

  • Guest
Re: Static pages
Reply #4 on: Fri, 19. January 2007 - 15:16:15
Im not sure, but I think this way coukd be a solution:

I use the standalone-interpreter of php (php.exe) to parse the sscript via a shell and send the output to a file.
It look ssomething like this:
c:\...\php\php.exe c:\c:\...\projektdir\projektfile.php > c:\htmlout\projektfile.html
 
Hope this idea may help you

Offline ClausVB

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
    • Homepage: clausvb.de
Re: Static pages
Reply #5 on: Sat, 20. January 2007 - 13:33:58
I would use mod_rewrite.

Code: [Select]
RewriteRule ^([a-z]+)_([a-z0-9]+).htm$ index.php?inhalt=$1_$2
RewriteRule ^archiv-([a-z0-9_-]+).htm$ archiv_artikel.php?inhalt=$1
RewriteRule ^logs-([a-z0-9_-]+).htm$ logs_artikel.php?inhalt=$1

The following pages are all created with PHP and mod_rewrite.

http://clausvb.de/aktuelles_intro.htm
http://clausvb.de/archiv-artikel_45_typo3.htm
http://clausvb.de/logs-artikel_74_alien.htm