I wrote a regular expression for w w w.s e r v i c e s o n c l i c k . c o m / p r o d u c t s . p h p ? b r a n d i d = 2 7 & p n a m e = A c e r that redirects to h t t p : / / w w w . s e r v i c e s o n c l i c k . c o m / A c e r and similar to w w w . s e r v i c e s o n c l i c k . c o m / p r o d u c t s . p h p ? b r a n d i d = 2 9 & p n a m e = G i g a b y t e also redirects to h t t p : / / w w w . s e r v i c e s o n c l i c k . c o m / G i g a b y t e and so on but its not working.. I dont want to retain brandid only retain pname. Here it is the Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^servicesonclick\.com$ [NC] RewriteRule ^(.*)$ http://www.servicesonclick.com/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/ RewriteRule ^(.*)index\.php$ /$1 [R=301,L] RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^([^\.]+)$ products.php?brandid=27&pname=Acer [NC,L,QSA] Code (markup): Please, I need help..
try this code for: w w w.s e r v i c e s o n c l i c k . c o m / p r o d u c t s . p h p ? b r a n d i d = 2 7 & p n a m e = A c e r to h t t p : / / w w w . s e r v i c e s o n c l i c k . c o m / A c e r ----------------------------------------------------------------------- -------------------------------------------- check this code..
Thanks for the reply.. It is not working You can also check it online Here is complete .htaccess file <IfModule mod_rewrite.c> Options +FollowSymLinks Options +Indexes RewriteEngine on RewriteCond %{HTTP_HOST} ^servicesonclick\.com$ [NC] RewriteRule ^(.*)$ http://www.servicesonclick.com/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/ RewriteRule ^(.*)index\.php$ /$1 [R=301,L] RewriteRule /?$.php /products.php?brandid=27&pname=$1 [L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /products\.php\?brandid=27&pname=([^&]+)\ HTTP/ RewriteRule ^products\.php$ http://www.servicesonclick.com/%1.php? [R=301,L] </IfModule> HTML: