I want to write regular expression for http://www.servicesonclick.com/products.php?brandid=27&pname=Acer that redirects to http://www.servicesonclick.com/Acer and
similar to http://www.servicesonclick.com/products.php?brandid=29&pname=Gigabyte also redirects to http://www.servicesonclick.com/Gigabyte and so on
abhi10kumar 0 Junior Poster
Recommended Answers
Jump to PostIf you have .htaccess file pls add the below line in your .htaccess file, otherise create new one and add the below lines.
<IfModule mod_rewrite.c>
Options +FollowSymLinks
Options +Indexes
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^\.]+)$ products.php?brandid=27&pname=Acer [NC,L,QSA]
</IfModule>
Jump to PostYou want to lose the brandid parameter totally?
All 7 Replies
prasaddlv 0 Newbie Poster
nivibala 4 Newbie Poster
karthik_ppts commented: Helpful post +4
abhi10kumar 0 Junior Poster
nivibala 4 Newbie Poster
abhi10kumar 0 Junior Poster

diafol
abhi10kumar 0 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.