Forum Moderators: phranque

Message Too Old, No Replies

Rewrite my URL!

         

adsensejoe

10:37 am on Sep 3, 2005 (gmt 0)

10+ Year Member



I have the following complex URL:
http://mysite.com/mb/topic.php3?topic=79388&start=0&seekwrd=&seekrel=&idxstart=0

which I want to rewrite to:
http://mysite.com/mb/79388

How would I set up this in .htaccess?

Bonus-question: How would I set up this in httpd.conf?

I'm a newbie and I need guidance.... :) Thank you!

jdMorgan

3:36 pm on Sep 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



adsensejoe,

It sounds like you have some research to do and some code to write...

For example, it's most likely you want to rewrite from http://example.com/mb/79388 to http://example.com/mb/topic.php3?topic=79388&start=0&seekwrd=&seekrel=&idxstart=0 and not the other way around; Mod_rewrite does not change the links on your pages (or those listed in search engines), it changes the filenames associated with incoming requested URLs.

Guidance is available in our forum charter [webmasterworld.com], and several useful tutorials are available in the Apache Forum section of the WebmasterWorld Library [webmasterworld.com].

Jim

[edited by: jdMorgan at 1:50 pm (utc) on Sep. 15, 2005]

adsensejoe

9:16 am on Sep 15, 2005 (gmt 0)

10+ Year Member



yes, sorry, i meant the other way around. how would i set up this?