0

Running into any issue where my redirect is not firing... This is isapi rewrite 3.0

original domain: http://sub.main.com/asdf/asdff/index.php?/asdfff/14/asdffff-540-a-s-d-f-f/

New domain: http://newsub.newmain.com/a-s-d-f-f/ (quick edit - was missing the final -f from the above original domain)

htaccess:

RewriteCond %{HTTP_HOST} ^sub\.main\.com$
RewriteRule ^\/asdf\/asdff\/index.php\?\/asdfff\/(.+)\/asdffff-(.+)-?$ http://newsub.newmain.com/$1/ [L,R=301]
CBroe
  • 91,630
  • 14
  • 92
  • 150
Citti
  • 423
  • 1
  • 6
  • 23
  • 1
    `RewriteRule` looks at the _path_ component of the URL only, if you want to check the query string you will have to do that in an additional `RewriteCond`. – CBroe Apr 30 '14 at 18:11

1 Answers1

0

CBroe Thank you.

Just so everyone knows what I ended up with was below:

RewriteCond %{HTTP_HOST} ^sub.domain.com$

RewriteCond %{QUERY_STRING} /asdfff/(.+)/asdffff-(.+?)-(.+)

RewriteRule ^/asdf/asdff/ http://newsub.newmain.com/%3?

Thanks again.

City

Citti
  • 423
  • 1
  • 6
  • 23