.htaccess

How to make SEO friendly url using htaccess

In previous tutorial we learned about what is .htaccess . In this tutorial I will explain how to make SEO friendly url using htaccess.

Ex 1 :
https://phpgurukul.com/books.php?bookName=php  using  htaccess  url will be written like this https://phpgurukul.com/php

You can do this using code given below in htaccess file :

Ex 2 :

https://phpgurukul.com/books.php?bookName=php&&chapter=array   using  htaccess  url will be written like
https://phpgurukul.com/php/array

You can get by using code in htaccess file given below :

Ex 3 :

https://phpgurukul.com/books.php?bookName=2&&chapter=5 using  htaccess  url will be written like
https://phpgurukul.com/php/2/array/5

You can get by using code in htaccess file given below :

we can handle this url in other way like this https://phpgurukul.com/books-php-2-array-5.html

 

About the author

Anuj kumar

I'm Anuj kumar a web developer with 4+ year experience .I write blogs in my free time. I love to learn new technologies and share with others. I founded PHPGurukul in September 2015. The main aim of this website to is provide php , jquery , mysql , phpoops and other web development tutorials. I am trying best effort to make PHPGurukul useful for every single moment spend on this website. If you think this website is useful to visit please share with your friend and buddies.

Leave a Comment

Subscribe For Latest Updates