tags:

views:

39

answers:

2

How do i redirect

website.com/path/?p=4927304

to

website.com/path/4927304

where the number is dynamic.

Many thanks

+1  A: 

This rule will redirect URLs like /path/?p=4927304 to /path/4927304:

RewriteCond %{QUERY_STRING} ^p=([0-9]+)$
RewriteRule ^path/$ /path/%1 [R]
Gumbo
Hmm seems to throw a 500 error
Gavin Hall
I believe it should be RewriteCond %{QUERY_STRING} ^p=([0-9]+)$
Robus