Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Asvin Balloo's Blog:
SEO friendly URL in PHP
Jul 24, 2008 @ 16:14:40

Asvin Balloo has posted a quick look at making the URLs of your website a bit more "pretty" and SEO-friendly.

When I started implementing mod_rewrite in websites I had a problem in PHP as how to make a SEO friendly URL. All tutorials were geared towards how to implement mod_rewrite, about modifying .htaccess files, but none treated how to make the urls friendly with dynamic content.

He shares a function that he found that helped him a great deal - a method called friendlyURL. It changes a bit of text into a more friendly version of itself ("this is a test" becomes "this-is-a-test") that can be used in anything you'd want. An example could be in automatically generating links to other pages on your site that search engines can easily follow.

tagged: seo friendly url function parse search engine

Link:

Mind Tree Blog:
Friendly URLs in PHP: why do you care?
Jun 26, 2008 @ 15:26:59

This new post from the Mind Tree blog (at hurricanesoftware.com) asks the question "why do you care about friendly URLs in PHP applications?"

Nice URLs, readable URLs, search-engine-friendly URLs. Different names same deal. [...] Turns out this isn't all that hard with PHP - in fact it can turn into something that's very useful from more than just a readability viewpoint.

He shows how to use mod_rewrite and an .htaccess file to automatically grab the request and map it to the right place. Then, the PHP script looks at the incoming data and pushes the correct page back out to the browser. He's also included some modifications to the original idea that allow for numeric grouping and named groups for rewriting content.

tagged: friendly url modrewrite htaccess group named numeric

Link:

Tim Bromhead's Blog:
Super friendly URLs - handling spaces with URL Rewrites and PHP
Feb 20, 2007 @ 19:35:00

In a new entry today, Tim Bromhead shares his method for creating "super friendly urls" for a site's users using mod_rewrite:

Today we are going to show how to make the URLs with spaces super easy to type for users. bla.st uses dashes in the URLs to represent spaces eg. http//bla.st/web-design/. We chose dashes over underscores because underscores can get lost with underlined links, and we think they look nicer.

He includes the Apache config information for working with the VirtualHost entry and the simple PHP script to handle the requests. It looks in the SERVER superglobal, at the QUERY_STRING to see what the user is requesting and does an append and redirect accordingly. This example is made to take any form of a space in the URL (including underscores and %20), parse it out, and pass the user along correctly to the page they want.

tagged: friendly url space virtualhost apache modrewrite friendly url space virtualhost apache modrewrite

Link:

Tim Bromhead's Blog:
Super friendly URLs - handling spaces with URL Rewrites and PHP
Feb 20, 2007 @ 19:35:00

In a new entry today, Tim Bromhead shares his method for creating "super friendly urls" for a site's users using mod_rewrite:

Today we are going to show how to make the URLs with spaces super easy to type for users. bla.st uses dashes in the URLs to represent spaces eg. http//bla.st/web-design/. We chose dashes over underscores because underscores can get lost with underlined links, and we think they look nicer.

He includes the Apache config information for working with the VirtualHost entry and the simple PHP script to handle the requests. It looks in the SERVER superglobal, at the QUERY_STRING to see what the user is requesting and does an append and redirect accordingly. This example is made to take any form of a space in the URL (including underscores and %20), parse it out, and pass the user along correctly to the page they want.

tagged: friendly url space virtualhost apache modrewrite friendly url space virtualhost apache modrewrite

Link:

Zend Developer Zone:
Search Engine Friendly Websites with the Zend Framework
Oct 13, 2006 @ 17:18:00

The Zend Developer Zone brings the community yet another great tutorial on using the Zend Framework to accomplish a popularly requested feature - making search engine friendly sites.

The Zend Framework allows for websites that are search engine friendly, although some thought needs to be taken when building your application. Believe it or not, building a site that is search engine friendly can also yield usability benefits.

The author (robbolton) jumps right in to things, assuming you know the framework any your way around. He starts with the creation of a table for the articles to give the system a little background info to work with and a corresponding class to work with it. Next up is the controllers for the templating, complete with an indexAction, noRouteAction, and a __call method to handle the 404s.

Then comes the fun part - creating the viewAction to handle the incoming request and round the search engine firnedly request to the correct article information. He even throws in an addAction for the Articles class to help you input the information.

tagged: search engine friendly zend framework tutorial controller view database search engine friendly zend framework tutorial controller view database

Link:

Zend Developer Zone:
Search Engine Friendly Websites with the Zend Framework
Oct 13, 2006 @ 17:18:00

The Zend Developer Zone brings the community yet another great tutorial on using the Zend Framework to accomplish a popularly requested feature - making search engine friendly sites.

The Zend Framework allows for websites that are search engine friendly, although some thought needs to be taken when building your application. Believe it or not, building a site that is search engine friendly can also yield usability benefits.

The author (robbolton) jumps right in to things, assuming you know the framework any your way around. He starts with the creation of a table for the articles to give the system a little background info to work with and a corresponding class to work with it. Next up is the controllers for the templating, complete with an indexAction, noRouteAction, and a __call method to handle the 404s.

Then comes the fun part - creating the viewAction to handle the incoming request and round the search engine firnedly request to the correct article information. He even throws in an addAction for the Articles class to help you input the information.

tagged: search engine friendly zend framework tutorial controller view database search engine friendly zend framework tutorial controller view database

Link:

phpRiot.com:
Creating search engine friendly URLs in PHP
Jan 11, 2006 @ 13:03:54

PHPRiot.com has a new tutorial today dealing with the creation of "search engine friendly" URLs for your site.

One of the major reasons for using a server-side language such as PHP is for the ability to generate dynamic content. Often this will lead to single scripts that produce their content based on the input parameters (that is, the variables in the URL).

This article covers various techniques and methods for representing these parameters in the URL in a clean and "friendly" manner, as well as then how to read the parameters.

They start off with some examples of what they look like, and move right into how to use the Apache mod_rewrite functionality to take in the URL parameters and map them back to a PHP script. They also use the ForceType keyword in Apache to get the server to parse the URL string correctly. They then wrap it all up with the creation of a custom 404 page to handle the errors that might come up, and a summary of the whole project...

tagged: search engine friendly URL apache mod_rewrite ForceType search engine friendly URL apache mod_rewrite ForceType

Link:

phpRiot.com:
Creating search engine friendly URLs in PHP
Jan 11, 2006 @ 13:03:54

PHPRiot.com has a new tutorial today dealing with the creation of "search engine friendly" URLs for your site.

One of the major reasons for using a server-side language such as PHP is for the ability to generate dynamic content. Often this will lead to single scripts that produce their content based on the input parameters (that is, the variables in the URL).

This article covers various techniques and methods for representing these parameters in the URL in a clean and "friendly" manner, as well as then how to read the parameters.

They start off with some examples of what they look like, and move right into how to use the Apache mod_rewrite functionality to take in the URL parameters and map them back to a PHP script. They also use the ForceType keyword in Apache to get the server to parse the URL string correctly. They then wrap it all up with the creation of a custom 404 page to handle the errors that might come up, and a summary of the whole project...

tagged: search engine friendly URL apache mod_rewrite ForceType search engine friendly URL apache mod_rewrite ForceType

Link:


Trending Topics: