Page 1 of 1

Can anyone help me with mod rewrite? [SOLVED]

Posted: Fri Aug 06, 2010 12:00 pm
by davids355
I know this is a complicated subject, but I need some help with Mod rewrite...

I have read up on the subject here:
http://www.webmasterworld.com/forum92/82.htm - its the clearest explanation I've ever been able to find... But I am still struggling.

I want to redirect:
http://www.shareworld.co.uk/index.ph...ic/7/55/1/190/
to
http://www.shareworld.co.uk/index.ph...ic/1/55/1/190/

And there are loads of pages I need to do this for, always changing the 7 to a 1, and the next two digit number will always be unique.

I have tried this:

RewriteRule \/topic\/7\/[0-9][0-9]\/1\/190\/$ \/topic/1/[0-9][0-9]/1/190/ [R=301,L]

but it does not work.

Just wondering if someone could either tell me how to do it, or perhaps give me some pointers.

Thanks

Dave

Re: Can anyone help me with mod rewrite? [SOLVED]

Posted: Sat Aug 07, 2010 10:44 am
by davids355
Don't worry sorted it

Re: Can anyone help me with mod rewrite? [SOLVED]

Posted: Sat Aug 07, 2010 3:00 pm
by replytomk3
care to document how??????????????

Re: Can anyone help me with mod rewrite? [SOLVED]

Posted: Sat Aug 07, 2010 3:24 pm
by davids355
RewriteRule  [/]*([^/]*/[^/]*/[^/]*/[^/]*)/7/(.*)$    /$1/1/$2 [R=301,L]

that's how I done it. To be honest got the answer from experts exchange! Did do some research though and think I understand how it works now.