Hello, all:

I have a general question on SEO and database-driven site integration...
I am starting to convert a company site from static, to dynamic driven site (php/mysql) with a basic admin section, so that owner can make changes himself thru the browser. I have read about issues related to these database content not really being able to be searched or seen by spiders, specially if these have the sort of url like ?p=12&id=45. I also understand there are ways to make these url's more seo friendly.

But what about if I simply have a page "about us" that will always automatically load the "about us" text from the database when page is called, no need to even call any url variables. Wouldn't that then be REALLY REALLY searchable by spiders/search-engines?? Since in a way, that kind of works just like and "include" file, it's always "there" when page is called up...

I have also seen where many times a dynamic site might have a "landing-page" or set of landing pages, that are really static, strictly for SEO purposes, that then direct people to the actual database-drive site.

Any thoughts on this? or things to watch for to make database-driven content more SEO friendly?

Appeciate any feedback!

8 Years
Discussion Span
Last Post by cwarn23

Using the include function is one way of doing it but another way of achieving seo friendly urls is using a htaccess file (if apachie enables the rewrite mod). To make it easier below is an example url that I'll explain below:

http://www.example.com/index.php?category=more_info&page=contact_us http://www.example.com/more_info/contact_us.html

The first example url above shows the true location of the php file which can be set so when you visit the second url (the html file), it will display the data in the php file while keeping the url in the address bar as the html file. This is known the the url rewrite mod which allows you to create virtual pages and can even hide the fact that you are using php. Now to create what I have described above, first create a file called ".htaccess" without the quotes (note: windows explorer may not allow you to create that name so use notepad to save as that name.) and put in the .htaccess file the below code.

RewriteEngine On
RewriteRule ^(.*)/(.*).html$ index.php?category=$1&page=$2

Then place that htaccess file in the homepage directory (for the above url example to work) and from there, instead of linking to the php file, link to the html file as shown in the first code box.
That is the basics but if you can give examples of your different php urls (post those urls inside a code box) then I will happily create a .htaccess file that will allow you to link to seo friendly pages.


Hi, Cwarn:

thanks for your feedback, it was very helpful.

I do have one more thing... what I was saying about the "includes" was that I was just simply comparing them to something like if I had a page called "about-us.php", which is always set to automatically retrieve the "about-us" text from the database the moment is called on the browser, then it pretty much acts in same manner as a regular "include" file would, doesnt it?? so a search engine wouldnt have a problem at all searching it, reading it? Since one doesnt even have to call for an url-variable at all... it just comes up just by going to www.samplesite.com/about-us.php as one normally would. As opposed to where one would have to call for a specific record-page out of many (page=aboutus, page=home, page=contact, etc).

I say this cause the way site is built, it already has several individual pages setup, so I was just going to link each individual page directly to its corresponding record on the DB, that way I dont have to re-design the whole site... otherwise I may have to do it's own template to allow for dynamic ttiles, headlines, and menu-butons stuff that simply may take too long to address.

Thanks again!


Since in a way, that kind of works just like and "include" file, it's always "there" when page is called up

I must have misread the sentence in the above quote and what I meant about the include function was having a separate php file for each page to be displayed which wouldn't be very convenient for a content management system.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.