URL re-writing means reformatting the webpage URL and turn your long dynamic URL into a shorter and static one.It gives a better representation of your URLs.To accept GET arguments through a URL we need to modify the .htaccess file in root website folder.Which helps to convert your Page Urls into well organized form.e.g.
http://techniblogic.com/?tag=SEO
to
http://techniblogic.com/tag/SEO
Generally this is nothing more than enabling the mod_rewrite module (you likely already have it enabled with your host), and then adding a .htaccess file into your web-directory. mod_rewrite is used for rewriting a URL at the server level, giving the user output for that final page.
There are two ways of Respresention of your URL ,they are :-
Type 1 – Single Page URL
Generated URL | http://techniblogic.com-tag-seo.htm |
Example URL | http://techniblogic.com-tag-(Any Value).htm |
Create a .htaccess file with the code below
The .htaccess file needs to be placed in techniblogic.com
Options +FollowSymLinks RewriteEngine on RewriteRule -tag-(.*)\.htm$ ?tag=$1
Type 2 – Directory Type URL
Generated URL | http://techniblogic.com/tag/seo/ |
Example URL | http://techniblogic.com/tag/(Any Value)/ |
Create a .htaccess file with the code below
The .htaccess file needs to be placed in techniblogic.com
Options +FollowSymLinks RewriteEngine on RewriteRule /tag/(.*)/ ?tag=$1 RewriteRule /tag/(.*) ?tag=$1
You can use SIMPLE .htaccess URL Rewriting Tool for Regenerate URL rewrite rules for your Apache .htaccess file. It takes a list of dynamic URLs and converts them into SEO friendly static URLs.
- Open URL Rewriting Tool Page
- Enter the Query URL in the Input Box
- It will Generate 2 Formats of URL Representations.Choose the method you like.
This tool help you to easily create code for your .htaccess file,you just have to copy and paste that created.
- Done
URL Rewriting FREE Tool
Hope this will help you and solve your problem 🙂