• Services
    • Web Hosting
    • Reseller Hosting
    • VPS Hosting
    • Dedicated Hosting
  • Domains
  • Features
  • Company
    • About Us
    • Server Locations
    • Affiliates
    • Company Blog
  • Support
  • Client Login
  • Services
    • Web Hosting
    • Reseller Hosting
    • VPS Hosting
    • Dedicated Hosting
  • Domains
  • Features
  • Company
    • About Us
    • Server Locations
    • Affiliates
    • Company Blog
  • Support
  • Client Login
Home/Article/Web Hosting/.htaccess/How to Create SEO Friendly URL Using .htaccess

How to Create SEO Friendly URL Using .htaccess

Written by VernalWeb
August 10, 2017

So far we’ve learned that .htaccess can easily be used to make some tweaks over Apache Web Server’s configuration. Now we’re going to learn that how can we create SEO Friendly URL using .htaccess.

How to Create SEO Friendly URL using .htaccess

STEP 1: Login to your cPanel Account. Navigate to File Manage under Files section. Browse to public_html folder & open .htaccess on editor.

STEP 2: Let’s think you’ve got a dynamic URL like https://www.yourwebsite.com/products.php?keyval=25&keyval2=65 which you need to convert to a SEO Friendly URL. Well, write the codes below in your .htaccess file to perform this task

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{QUERY_STRING} "keyval\=25&keyval2\=65$ [NC]
RewriteRule ^products.php$ https://www.yourwebsite.com/household-products.php? [r=301]

Note: Don’t forget to put a (?) question mark at the end of the substitution URL you’ve created. Otherwise query string will be appended at the end of the substitution URL.


We hope this tutorial helps you find the perfect solution. If your like our tutorials, definitely you’ll love our support. All VernalWeb hosting plans include 24/7 support from our amazing inhouse support staff. Check out our web hosting plans and have your website migrated today!

Tags:htaccess

Was this helpful?

Yes  No
Related Articles
  • How to create or edit .htaccess file in cPanel
  • How to Redirect HTTP Requests to HTTPS with .htaccess
  • How to enable hotlink protection using .htaccess Code
  • How to create custom 404 page using .htaccess
  • How to create 301 redirection using .htaccess
  • How to force SSL using .htaccess file

Didn't find your answer? Submit Ticket

Latest Articles

  • How to show Hidden Files (.htaccess) in cPanel File Manager
  • Setup a Domain Redirection in cPanel
  • Create a MySQL Database and a User from cPanel
  • Remove page extensions using .htaccess
  • Cron Job Usage & Policy
  • © 2014 - 2025 VernalWeb. All rights reserved.