Forum Moderators: mack
I am trying to figure out how, if possible, to create html static pages from a MySQL php pages?
Can anyone direct me to a post, if any?
or
Could anyone write some simple guidelines for this task?
I have read a few post on the subject, but none have a simple explanation with instructions on how to get started. I am fairly new to php.
Any help would be great. Thank you.
Also I have read that there is no difference between dynamic and static html page rank when it comes to Google. Any insight would also be appreciated.
I was wondering though. In reference to the code given in the linked thread:
if the page was aboutus.php (to take the example in the thread)
we had .htaccess code:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^about([0-9]+)\.html$ /aboutus.php?oid=$1 [L]
This might be a stupid question but I will ask it!
Now, if I want to have the name of the category (which is a field in my MySQL table) show in the html url and the title of the article (which I also have in the MySQL table as a field), how would I write it in my .htaccess file, if even possible?
example:
mycategories.php?category=Bathroom%20Decorating&articleID=20
could I make it:
bathroom-decorating-my-article-title.html instead?
I am not sure this is the right approach but any help would be great.
If I have the following URL that I want to rewrite:
home-decor.php?cat=Bathroom%20Decorating
I want as a result:
home-decor-category-name.html
Is the following correct:
RewriteRule ^home-decor-([a-z])\.html$/home-decor.php?cat=$1 [L]
It seems to me that a RewriteCond would be necessary to clean the %20 but I am not sure how to incorporate it, if necessary.
Any help would be appreciated.