Apache RedirectCond/RedirectWrite Help
I am nearing the completion of converting an Accrisoft CMS site to Drupal and have one last piece that is not working.
Accrisoft's URL generation is like other CMSs, clunky, but since the site has been around for so long the URLs have gained good reputation on Google, Bing, Yahoo, etc. Normally this really wouldn't be a big deal, but for this certain case it really has been.
Here's what I have to work with:
OLD URL: http://d.proimage.net/index.php?src=gendocs&ref=STORELOCATOR&category=Main
NEW URL: http://d.proimage.net/franchise-locator
And here's what's NOT working (sends me to the home page):
RewriteCond %{HTTP_HOST} d.proimage.net
RewriteCond %{REQUEST_URI} ^/index.php\?src=gendocs\&ref=STORELOCATOR\&category=Main$
RewriteRule . http://d.proimage.net/franchise-locator [L,R=301]Anyone out there have any new ideas to try? I have to get this working...for SEO purposes...so I'm reaching out for any help or tips on what to do here. Thanks.


shot in the dark
shot in the dark
RewriteRule index.php\?src=gendocs\&ref=STORELOCATOR\&category=Main franchise-locator [L,R=301]One more to try
RewriteCond %{HTTP_HOST} d.proimage.netRewriteCond %{REQUEST_URI} index.php
RewriteCond %{QUERY_STRING} src=gendocs\&ref=STORELOCATOR\&category=Main
RewriteRule . http://d.proimage.net/franchise-locator [L,R=301]
Wow. I really feel stupid. I
Wow. I really feel stupid. I tried everything I could with the RewriteRule and couldn't get anything to work. Anything that worked would break the entire Drupal site (images, etc.) The first one you put up worked! I should've come here first. :)
While it works, it just changes the index.php to franchise-locator, which is fine. But is there any way to fix that? Here's what it forwards me to:
http://d.proimage.net/franchise-locator?src=gendocs&ref=STORELOCATOR&category=MainAndrew (amariotti)
strange
In the rules for the first one I didn't specify QSA (query string append)
What about the second one?
RewriteCond %{HTTP_HOST} d.proimage.netRewriteCond %{REQUEST_URI} index.php
RewriteCond %{QUERY_STRING} src=gendocs\&ref=STORELOCATOR\&category=Main
RewriteRule .* http://d.proimage.net/franchise-locator [L,R=301]
I get the following error
I get the following error from Firefox when using that one:
The page isn't redirecting properlyAndrew (amariotti)
I'm really frustrated now. I
I'm really frustrated now. I had it working temporarily and I can't get it back to where it was doing what I mentioned above. Really frustrating. This thing has been a real pain.
Andrew (amariotti)
Strange. For some reason it's
Strange. For some reason it's not working anymore. Not sure what really happened...Trying to replicate it and it's not working. Ugh. :(
Andrew (amariotti)
If you want to use the Path
If you want to use the Path redirect module for this you can create a redirect:
From:
<front>?src=gendocs&ref=STORELOCATOR&category=MainTo:
franchise-locatorSenior Drupal Engineer for Palantir.net | www.davereid.net | certifiedtorock.com/u/53892
Awesome! I was hoping that
Awesome! I was hoping that Path Redirect module could do the trick, but just something wasn't working for me. That was it! Thanks a million!
Cheers!
Andrew (amariotti)