So, I really appreciate everyone's help on the .htaccess file I've been working on ( see thread [
webmasterworld.com...] for original questions ) Thanks to the help I got, the .htaccess file I created worked perfectly on the test server.
However, when I implemented it to the live server, things did not go as planned, and I have no idea where to even start debugging it, as I don't know a whole lot about .htaccess files and even less about servers. Let me see if I can describe the problem properly.
First off, "example.com" is the original website, and "example.org" is the website I'm trying to redirect to. It's a completely different URL from the old site, not a .org version of the old URL, but I needed two variations of "example.com".
Here is the line of code in my .htaccess that pertains to the following URL examples:
RewriteRule c-GinoAns_East http://www.example.org/product-category/deep-dish/? [R=301,L]
Here are a bunch of different URLs that this rule applies to, and which all redirected perfectly on the test server, along with the way that they are redirecting now on the live server:
http://www.example.com/a-store/c-GinoAns_East.shtml --> 301 Redirect to http://www.example.org/product-category/deep-dish/ (works perfectly)
http://example.com/cgi-local/SoftCart.exe/a-store/c-GinoAns_East.shtml?E+scstore+ginos%EF%BC%89 --> 302 redirect to http://www.example.org/cgi-local/SoftCart.exe/product-category/deep-dish/index.html?L+scstore+yvvl4061ginos)ff006100+1422904538 (This is close, but it shouldn't be appending the query string since I used a ? at the end of the rule, and also I don't know why it's a 302 instead of a 301)
http://example.com/cgi-local/SoftCart.exe/a-store/c-GinoAns_East.shtml --> 500 Internal Server Error
http://example.com/cgi-local/SoftCart.exe/a-store/c-GinoAns_East.shtml?L scstore rhyw2735ginosff6ea96e --> 500 internal server error.
Do any of you have any ideas for why these different results might be happening? My only thought was that there's some sort of ecommerce software that was generating the site originally (the /cgi-local/SoftCart.exe part), and that it's running before the .htaccess file. But that seems weird, because wouldn't the server run all of the .htaccess and configuration files before any installed software?
Now, the other problem is, where to put the .htaccess file. When I first log into the server through FTP, I get various folders, including:
cgi-local
htdocs
and some other ones (bin, conf, dev, etc, ftp, logs, merchant, pub, usr). Now, when I try to put the .htaccess in this main folder, the transfer fails (I get a "permission denied" error.) The .htaccess was originally placed (not by me) in the htdocs folder, where I appear to have appropriate permissions. I was wondering if the fact that the file is in the htdocs folder means that it doesn't affect anything in the cgi-local folder, so I put the .htaccess file in there too. However, this did not change any of the results. So now I'm not sure what to do.
Anyways, I would really appreciate any help here, because I'm completely at a loss for what to do, or if there's anything I CAN do.