PHP SEO Programming Tips

KeyWords: PHP SEO Programming Tips

PHP SEO Programming Tips
by FrosT

Introduction
Figuring out how to do SEO or Search Engine Optimization with PHP is not an easy thing to do. In this article I will explain some great tactics to increase your SEO and hopefully in 6 months get you ranked high up there. This will all be done with PHP programming language running on an APACHE server. Sit back, grab a Mountain Dew and lets get to it.

.htaccess is your friend.
The .htaccess file for Apache is your biggest friend for this task. The way Aeonity Free Blog Community is setup is that almost any request to view a blog file is routed through a processing file. For isntance, http://www.aeonity.com/david is not a real page. Their is no truth to that url other than the Aeonity.com. How do we do it? Well with htaccess we filter out anything that is not a directory or a file. For instance the url above is not a directory, nor is it a file. After we filter those we check for a valid extension. If they contain that valid extension than we leave them alone. If the requested url does not meet any of those criteria, it is processed in a file that no one knows about.

Processing the requested url is not extremely difficult. The processing does take some time and thinking, but for the most part it is pretty straight forward. First things first, creating the file:

Process Requested URL
Now we have a requested URL, that does not exist. How do we create a file that does not exist? Simple, we parse the data. The example url, which was http://www.aeonity.com/david gives us certain data. For instance we know david is the username. That is all we need to provide the user with that particular blog. Let's parse it. In the process file we have to get variables from that url, in order to do that the requested URL must be parsed. We will split the requested URL at the "/". Put that into a variable for their username. Now let's pull the data.

How I do the next part is include the main file we are pulling up. In this case it woud be blog.php. I add the username to the $_GET data manually and then include blog.php. With that passing through our blog.php will work with eitherblog.php?user=david or http://www.aeonity.com/david . Using this technique your website can be completely dynamic and SEO friendly using PHP and Apache.

Ending Notes
This was a brief overview of how to make dynamic Search Engine Friendly URLs with .htaccess and a processing php page. With Apache, .htaccess, PHP and http://www.php.net/. You too can make your own dynamic Search Engine Friendly website.

Posted by frost on Feb 6th, 2006 14:46 - Subscribe Bookmark and Share


Post a comment:

Only registered / logged in members can post comments on this blog entry.



 

Widget

Hypersmash.com

Extras

  • Not Implemented