Forum Moderators: phranque

Message Too Old, No Replies

Rewrite question

         

dnsaus

12:11 am on Jun 18, 2006 (gmt 0)

10+ Year Member



Hi
When I put the following:
http://www.example.com/11.37485
I want it to go to:
http://www.example.com/tours/showtour.php?tid=11.37485

The number will change depending on the tour obviously, so the number is dynamic.

I have not studied htaccess redirects so I am at a loss.

Can anyone help?

Regards
Tony

[edited by: jdMorgan at 2:41 am (utc) on June 18, 2006]
[edit reason] examplified. [/edit]

jdMorgan

2:40 am on Jun 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



See the Apache RewriteRule documentation, specifically "back-references." There is also a link to example code at the end of the mod_rewrite documentation.

For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

Jim

dnsaus

10:47 pm on Jun 18, 2006 (gmt 0)

10+ Year Member



Thanks Jim
Since posting, I have managed to work something out.

Tony