I'm focusing on building my first search-engine friendly Content management systems. I understand that possibly among the greatest secrets to getting and Search engine optimization website is to possess search-engine friendly Web addresses. So getting a hyperlink such as this:


can lead to far better ratings than a single such as this:


I understand that to produce Web addresses like the first, I've 1 of 2 options:

  • make use of a web technology, within this situation PHP, to produce a directory structure
  • leverage Apache's mod_rewrite addon to possess these Web addresses passed to some PHP processor

So far as the PHP goes, I am pretty confident with anything. However, I believe the very first option is harder to keep.

Could someone show me to create an .htaccess file, that will:

  • quietly direct Search engine optimization Web addresses to some processor script
  • not redirect when the asked for URL is definitely an actual directory around the server

It is possible to better way than generate an income am giving it a go?

Appreciate your time and effort.

You should use .htaccess for apache, create file inside your root folder of web mainly "htdocs" title it ".htaccess" add next content into it

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
    Options -Indexes

inside your php file you have access to data from $_GET


You'll be able to use data to parse the thing you need.

Yes, the very first option is pretty difficult to maintain. If you wish to alter the header from the pages, you'd have to recalculate all from the pages.

The easiest method of doing that might be to possess a php file named product.php or product/particulars.php and employ the $_SERVER['PATH_INFO'] variable to determine exactly what the client asked for.