Welcome to WebmasterWorld Guest from 107.23.176.162

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

mod_rewrite

     
11:01 pm on Nov 18, 2002 (gmt 0)

New User

joined:July 21, 2002
posts:21
votes: 0


help

how do I change

domain.com/sports/article.pl?search=12345
and
domain.com/fitness/article.pl?search=654321

to

domain.com/sports/12345.htm
and
domain.com/fitness/654321.htm

Please help, I cant seem to find a close enough example anywhere on the web and I can't get my head around it.

11:12 pm on Nov 18, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


marmalade,

Something like this should work:

RewriteCond %{QUERY_STRING} (.+)
RewriteRule (.*)/article.pl $1/%1.htm [L]

Jim

<edit> added ".htm"</edit>

[edited by: jdMorgan at 12:24 am (utc) on Nov. 19, 2002]

11:59 pm on Nov 18, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 22, 2002
posts:1782
votes: 0


RewriteRule (.*)/([0-9])+\.html $1/article.pl?search=$2 [L,QSA]

does the reverse. This might be the thing you really want.

Andreas

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members