Can anyone help me with mod rewrite? [SOLVED]

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
davids355
Power Poster
Power Poster
Posts: 279
Joined: Fri Apr 04, 2008 10:08 am

Can anyone help me with mod rewrite? [SOLVED]

Post 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
Last edited by davids355 on Sat Aug 07, 2010 10:43 am, edited 1 time in total.
davids355
Power Poster
Power Poster
Posts: 279
Joined: Fri Apr 04, 2008 10:08 am

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

Post by davids355 »

Don't worry sorted it
replytomk3

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

Post by replytomk3 »

care to document how??????????????
davids355
Power Poster
Power Poster
Posts: 279
Joined: Fri Apr 04, 2008 10:08 am

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

Post 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.
Post Reply

Return to “The Lounge”