Redirect SoftCart URLs to ShopSite URLs

General ShopSite user discussion

Redirect SoftCart URLs to ShopSite URLs

Postby Randall » Wed Sep 27, 2006 5:27 pm

I've recently converted a SoftCart store to ShopSite. Search engines and former visitors are looking for the old cart's URL, which is like this:
www.domainname.com/cgi-local/SoftCart.e ... e.html?etc.

How can I redirect this to the following?
www.domainname.com/filename.html

The old URL results in either a browser 404 (MSIE) or Apache's internal 404 (Firefox), and some of my attempted fixes (below) give a server error.

Our hosting service (Verio, where the old store was), assures me that client requests are sent to .htaccess before anything else is processed, but things don't seem to perform that way. If I change "cgi-local" to "xcgi-local" or "anything-else", .htaccess lines are handled. But not if the string is "cgi-local" or "cgi-bin".

I've tried following kludges, with no success:

* Putting an .htaccess file in cgi-local and for that matter cgi-bin (the one in bin gets accessed if ...bin.. is requested, the one in cgi-local does not work similarly. Neither will run a redirect, though.)
* Creating directories called /cgi-local/SoftCart.exe/ under htdocs, with an .htaccess or dummy .html files to redirect.
* Eliminating the cgi-local directory (hoping to create a 404). It gives a 404 but our root .htaccess doesn't catch it.
* Thought of trying to create a dummy program called SoftCart.exe and putting it in /cgi-local/, but even if I could do that, Verio says it would not be allowed. I'm limited to .pl and .php (which if I could get the old URL to run, I wouldn't need, right?).

I've also tried using .htaccess, which I would think should be the right way to do this.

Verio says to use .htaccess in combo with a script and that "there are plenty of scripts out there" but Support is unwilling to elaborate. Have tried the following in .htaccess:

RedirectPermanent /cgi-local/SoftCart.exe/filename.html http://www.domainname.com/filename.html

This works (when I create a hooha directory)
RedirectMatch \/hooha\/SoftCart\.exe\/(.*) http://www.domainname.com/$1
But not this...
RedirectMatch \/cgi-local\/SoftCart\.exe\/(.*) http://www.domainname.com/$1

I've also tried a few mod rewrite lines, but that's over my head and if it's the key, I don't quite follow it. I can confirm that RewriteEngine is on. I can't confirm that Verio supports it. (They've said that they don't even formally support .htaccess!)

I know, there's one other increasingly tempting solution -- find a more supportive provider -- but this issue will rapidly decrease in importance as old visitors either adapt or get discouraged. Mainly, I figure those who convert in the future might benefit from the discussion.
Randall
 
Posts: 26
Joined: Fri Aug 04, 2006 6:19 pm

Postby robm » Wed Sep 27, 2006 5:55 pm

Did you try putting the .htaccess file in the main web directory and see if that worked? The line:

Code: Select all
RedirectMatch \/cgi-local\/SoftCart\.exe\/(.*) http://www.domainname.com/$1


should work if the .htaccess file is in the main web directory. If not, then cgi-local is not setup in the same manner as your regular webspace, which would cause the .htaccess file to be bypassed for this location.

One other thought is to replace SoftCart.exe in cgi-local (if the software is physically in your webspace), make it executable, and put code such as this:

Code: Select all
#!/usr/bin/perl

print "Location: http://www.your_domain.com/newpage.html\n\n";
exit;


You could probably parse the full URL, extract the filename.html part, and redirect that for more detailed redirection.

Also reference:
http://www.verio.com/support/documents/ ... oc_id=3624

HTH
robm
 
Posts: 463
Joined: Fri Aug 04, 2006 5:46 pm
Location: Connecticut

Postby Randall » Wed Sep 27, 2006 7:03 pm

Rob,

Thanks for your super-fast response.

The site is on a shared server, and the FTP architecture is this:
Code: Select all
000.00.00.000 (our IP Nbr)
   - etc
   - ftp
   - users
   - and so on
   - www
         - cgi-bin
         - cgi-local (added by me)
         - urchin
         - logs
         - shopsite-data
         - htdocs
              index.html (home page)
              - subdir1
                  index.html
              - subdir2
                  index.html

As you probably noted, I've already tried the redirectmatch code you suggest, in cgi-bin, cgi-local, and htdocs and other places. (FWIW, I also tried putting a dummy cgi-local under htdocs, and/or a dummy SoftCart.exe directory under the real cgi-local.)

I'll try it under www and at the IP level as soon as I get a chance.

As for creating an executable, if there's a Perl compiler, it post dates my Perl 5 cookbooks and I'm not familiar with it. I think there's a free Basic compiler?

But Verio Support has told me "an 'exe' file will not be executable on our system regardless of where it resides." So I guess that's not an option.

At this point it's mostly of academic interest to me, since the search engines have by now probably decided that the URLs are dead, and most users (I hope) will find their way to our home page. If I find something that works, I'll post it.

Meanwhile, thanks so much. And I've noted the URL in your sig.
Randall
 
Posts: 26
Joined: Fri Aug 04, 2006 6:19 pm


Return to User Forum

Who is online

Users browsing this forum: No registered users and 27 guests