Jump to content

[SOLVED] Very specific screwy URL I need to rewrite


Helmet

Recommended Posts

Hi,

Google Webmaster tools is telling me I have a bunch of 404's probably due to a previous botched rewrite (since fixed) but I'd like to fix the 404's now. The URL's look like this

 

directory1/directory2//file.php?id=3898

 

and I'd like to redirect to

 

directory1/directory2/3898/

 

It's that double slash in there I think. This is not working:

 

RewriteCond %{QUERY_STRING} ^id=([0-9]*)$

RewriteRule ^([^/]+)directory2//file\.php$ /$1/directory2/%1/? [R=301,NC,L]

 

Is there something I'm missing?

 

Thx,

Helm

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.