By Admin - June 26, 2017 11:47 pm 1 197 0
Htaccess is Hypertext Access and it is configuration file used by Apache based web servers. It is also helpful for better SEO Every client want their website s url attractive and don't want to display the query strings id's to users. So here s the solution. You can hide any url with htaccess rewrite rules.
Htaccess Rule is basically used for rewrite the url. We can update our website url according to clients requirement with htaccess rewrite rules.
Before URL :
After URL :
- Create the new file with name .htaccess in website root folder.
- Now Apache Server can read the htaccess rules.
- Write this code in .htaccess file.
- RewriteEngine must be On in your htaccess file otherwise it will not work.
RewriteEngine On #For rewrite url of page.php page RewriteRule ^([^/]*)/([^/]*)/([^/]*)/$ /page.php?category=$1&product_name=$2&id=$3 [L]
- Save .htaccess file and run your new URL on web browser.