II6 ISAPI rewrite rule SEO New URL

ISAPI_Rewrite is a powerful URL manipulation engine based on regular expressions
User avatar
Posts: 6
Joined: 09 Aug 2014, 07:40

II6 ISAPI rewrite rule SEO New URL

31 Aug 2014, 07:38

II6 ISAPI SEO rewrite rule in httpd.ini file re .php?n=1


Hi,
I am trying to do a URL rewrite and a permanent redirect for a php search query result.
I want to change domain.co.uk/products.php?n=1 (Gives a list of products)

to

domain.co.uk/new-products

The rewrite rule works fine so that you can see the new URL web page:

RewriteRule /new-products/?$ /products.php\?n=1 [L]

but the Permanent Redirect from the old URL to the New URL doesn't work. :(
I am trying:

RewriteRule ^/new-products\.php?n=1 domain.co.uk/new-products [I,O,RP,L]

Any help would be very useful as I have tried a variety of combinations so I think I must have something totally wrong somewhere!

Thanks

Neil

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: II6 ISAPI rewrite rule SEO New URL

01 Sep 2014, 05:33

Hello, Neil

Please try to have the following rules:

RewriteRule /new-products\.php\?n=1 http\://domain.co.uk/new-products [I,RP,L]
RewriteRule /new-products/? /products.php\?n=1 [I,L]

User avatar
Posts: 6
Joined: 09 Aug 2014, 07:40

Re: II6 ISAPI rewrite rule SEO New URL

01 Sep 2014, 20:09

Hi Anton,
I quickly got a slight variation of your suggestion (as below) working so many thanks again.

RewriteRule /products\.php\?n=1 http://www.domain.co.uk/new-products [I,RP,L]
RewriteRule /new-products/? /products.php\?n=1 [I,L]

Regards
Neil

Return to ISAPI_Rewrite 2.x

Who is online

Users browsing this forum: No registered users and 5 guests