Subscribe
Tutorial search

PHP Mod_rewrite Tutorials


Sort by:
Create SEO friendly URL`s Using mod rewrite in PHP (.htaccess)
Create SEO friendly URL`s Using mod rewrite in PHP (.htaccess)
In this tutorial I will show you how to convert dynamic URL`s into Search Engine Friendly and easy to understand both for humans and machines URL`s.
Difficulty:
Create SEO friendly URL`s using mod rewrite in PHP (.htaccess)
Create SEO friendly URL`s using mod rewrite in PHP (.htaccess)
In this tutorial I will show you how to convert dynamic URL`s into Search Engine Friendly and easy to understand both for humans and machines URL`s. To change the URL`s we will use the Apache`s mod_rewrite function what can easily match URL`s using regular expressions. If it sounds confusing don`t worry, I will explain everything step-by-step and you can always leave a comment!
Difficulty:
Create SEO friendly URL`s using mod rewrite in PHP (.htaccess)
Create SEO friendly URL`s using mod rewrite in PHP (.htaccess)
In this tutorial I will show you how to convert dynamic URL`s into Search Engine Friendly and easy to understand both for humans and machines URL`s. To change the URL`s we will use the Apache`s mod_rewrite function what can easily match URL`s using regular expressions. If it sounds confusing don`t worry, I will explain everything step-by-step and you can always leave a comment!
Difficulty:
URL Rewrite for more than 9 variable using PHP by make configuration in .htaccess file
URL Rewrite for more than 9 variable using PHP by make configuration in .htaccess file
Rewrite URL for more than 9 variable in .htaccess file One of the more powerful tricks of the .htaccess is the ability to rewrite URLs. This enables us to do some mighty manipulations on our links; useful stuff like transforming very long URL's into short, cute URLs, transforming dynamic ?generated=page&URL's into /friendly/flat/links, redirect missing pages, preventing hot-linking, performing automatic language translation, and much, much more. For example we have link like this : www.domain.com?read_blog.php?id=2 with article title "htaccess trick for friendly URLs" The above url form are difficult to read by google, let's try this url www.domain.com/read_blog/2/htaccess_trick_for_friendly_urls/ It is more beauty, and from url we know the article title. Google like this url. To create the .htaccess we use this form. RewriteEngine on RewriteRule ^read_blog/([0-9]+)/([0-9a-zA-Z_]+)/?$ read_blog.php?id=$1 [L,QSA] for more variable we can make it like this RewriteEngine on RewriteRule ^read_blog/([0-9]+)/([0-9a-zA-Z_]+)/([0-9a-zA-Z_]+)/([0-9a-zA-Z_]+)/([0-9a-zA-Z_]+)/([0-9a-zA-Z_]+)/([0-9a-zA-Z_]+)/([0-9a-zA-Z_]+)/([0-9a-zA-Z_]+)?(/data/([0-9a-zA-Z_]+)/([0-9a-zA-Z_]+)/([0-9a-zA-Z_]+))?$ read_blog.php?id=$1&title=$2&pagetitle=$3&keyword=$4&description=$5&author=$6&about=$7&link=$8&colour=$9&country=$10&city=$11&state=$12 [L,QSA] for this case we might have faced error where .htaccess wont recognize the backtrack variable after $9 such that if you specify $10? then it will return you to $0? as value to that key in URL param. The mod_rewrite module is confused which varible to return $1 or $0. Back-references are identifiers of the form $N (N=0..9), which will be replaced by the contents of the Nth group of the matched Pattern. In the above RewriteRule, the variables $10 and $11 will return 0 and 1 as values respectively. Now let us look at the workaround to this problem. RewriteCond %{REQUEST_URI} /(data/([A-Za-z0-9_]+)/(.+)/(.+))?(/.+)$ RewriteRule ^read_blog/([0-9]+)/([0-9a-zA-Z_]+)/([0-9a-zA-Z_]+)/([0-9a-zA-Z_]+)/([0-9a-zA-Z_]+)/([0-9a-zA-Z_]+)/([0-9a-zA-Z_]+)/([0-9a-zA-Z_]+)/([0-9a-zA-Z_]+)?(/data/([0-9a-zA-Z_]+)/([0-9a-zA-Z_]+)/([0-9a-zA-Z_]+))?$ read_blog.php?id=$1&title=$2&pagetitle=$3&keyword=$4&description=$5&author=$6&about=$7&link=$8&colour=$9&country=%2&city=%3&state=%4 [L,QSA] Using the above RewriteCond and RewriteRule we can grab the values of the group after 9.
Difficulty:
Create SEO friendly URL`s using mod rewrite in PHP (.htaccess)
Create SEO friendly URL`s using mod rewrite in PHP (.htaccess)
In this tutorial I will show you how to transform your dynamic URL`s to easy to understand static URL`s
Difficulty:
Create SEO friendly URL`s using mod rewrite in PHP (.htaccess)
Create SEO friendly URL`s using mod rewrite in PHP (.htaccess)
In this tutorial I will show you how to make your URL`s more SEO friendly using Apache mod_rewrite to rewrite your URL`s by editing your .htaccess file.
Difficulty:
Creating a short url service like bit.ly with php and mysql
Creating a short url service like bit.ly with php and mysql
Learn how to create a short url service just like tinyurl.com with php, mysql and mod_rewrite in less than an hour!
Difficulty:
Easy Mod_Rewrite with PHP tutorial
Easy Mod_Rewrite with PHP tutorial
Mod_rewrite isnt as hard as the internet makes out - this simple tutorial will help you out whether you are a novice or advanced PHPer
Difficulty:
A Beginner's Guide to mod_rewrite
A Beginner's Guide to mod_rewrite
A beginner's guide on how to rewrite URLs with the mod_rewrite module.
Difficulty:
Create a short url service with php and mysql!
Create a short url service with php and mysql!
This tutorial shows you how to create a short url service just like http://folo.me with mod_rewrite, php, mysql and a bit of string manipulation
Difficulty:
Using Search Engine Friendly URLs for your Dynamic Pages
Using Search Engine Friendly URLs for your Dynamic Pages
"Search Engine Friendly URLs" or "User Friendly URLs" are a much better way of constructing your URLs for dynamic pages. In this article I will discuss some basic ways of doing this, with a little help from mod_rewrite.
Difficulty:
Making Clean URL's - Using Php and Mod_rewrite
Making Clean URL's - Using Php and Mod_rewrite
Making Clean URL's - Using Php and Mod_rewrite
Difficulty:
301 Redirect A URL Removing www.
301 Redirect A URL Removing www.
Redirect 'example.com' to 'www.example.com' or vice-versa using Apache's mod_rewrite. This is a MUST for SEO.
Difficulty:
Remove PHP query string with mod_rewrite
Remove PHP query string with mod_rewrite
Utilize Apache's mod_rewrite in order to acheive 'Clean URLs' such as /products/id/4.
Difficulty:
Create Dynamic URLs With Mod_Rewrite and PHP Functions
Create Dynamic URLs With Mod_Rewrite and PHP Functions
Create Dynamic URLs With Mod_Rewrite and PHP Functions
Difficulty:
Search Term(s) (1): mod_rewrite