I am trying to get an improvised SEO via cleaner URL.
Below is my .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ cleanurl2/podtadquery.php [L]
</IfModule>
Below is what my url is currently looking like:
http://localhost/cleanerurl2/podtadquery.php?product=Actuators&subgroup=Electrical
What I am trying to achieve is
http://localhost/cleanerurl2/podtadquery.php/Actuators/Electrical
Please suggest how can I achieve this. Thanks in adance
2
Answers
You can use the following code in /root/.htaccess
In your .htaccess file
Second line is to exclude jpg,jpeg,gif,bmp,png,tiff,css and js file. Other uri will be forwarded to index.php.
in index.php
If you are using ubuntu server, please do below lines too
Step 1.
Step 2.
Open apache conf file
Uncomment this line(about 187th line approx)
Then find the line where there is
replace “None” with “All”
Step 3.
Restart apache