Forum Moderators: phranque
I want to create pages, that, Are static result pages such as "arizona.php" etc... that display the widget listings for that state, Is there any way to make these? With content that updates along with the database, or do I have to manually update it?
If you need any thing clarified just ask.
Donny
This is what I got so far...
this will involve making a file named .htaccess that contains the rules
example:
if the user types in site.com/arizona.php send them to site.com/browse.php?state=arizona
if the user types in site.com/colorado.php send them to site.com/browse.php?state=colorado
RewriteEngine on
RewriteRule %{REQUEST_URI}!^browse.php
RewriteRule (.*).php browse.php?state=$1
Thanks whosawhata
I want pages that a search engine will index, so I can somewhat captalize on having a bigger site in the search engine. Hope that clarifys it if not I can answer and other questions.
An alternative definition is a "static" copy of a dynamically-generated page that is used to avoid having to run the script that generates the page too often. The usual method is to serve the static page if it is time-stamped after the last-modified date of the database that drives the script. If the database has been updated since the last time the static page was updated, then the script is re-run to create a new static page using the updated database.
A completely-different approach is to use a script to generate your pages, but to have the script generate on-page links to URLs that appear to be static pages, e.g. www.mysite.com/products/widgets/blue/large/model3.html. Apache mod_rewrite can then be used to convert those pages' URLs, when requested by clients (browser & spiders), to the dynamic-type URLs needed to call the script again, e.g. www.mysite.com/catalog.php?section=products&line=widgets&color=blue&size=large&model=3
Given all the possible things you might mean by "static pages," it's impossible to answer your question without further information on what you want to achieve.
Jim