Powered by Invision Power Board


  Reply to this topicStart new topicStart Poll

> Alternative to ScriptAlias, What can be used in .htaccess its place?
brucew
Posted: Jun 17 2003, 12:15 PM
Quote Post





Group: Members
Posts: 53
Member No.: 129
Joined: 21-November 02



Migrating a client over today to mdh0. They had a ScriptAlias in their httpd.conf file. ScriptAlias isn't allowed in .htaccess. I knew that but decided to try anyway. Naturally, Apache returns a 500 error. Big surprise. ohmy.gif

So, are there any recommended alternatives? Redirect? Rewrite?

Or should we simply hunt down all references to their BBS and change the links? (Not optimal as it won't fix visitor's bookmarks.)

<edit> I should add that this isn't an urgent issue since the BBS is used only seasonally. </edit>

TIA!
B


--------------------
I am not a complete idiot. Some parts are missing.
PMUsers Website
Top
andy
Posted: Jun 17 2003, 10:24 PM
Quote Post





Group: Advantagecom Staff
Posts: 4,340
Member No.: 9
Joined: 12-July 02



I suspect you may be dealing with a "red herring" here. All 'ScriptAlias' does is takes the URL typed into the browser and maps it to a different location on the file system than the default 'document root' for the site.

MDH accounts are setup similarly to the Upipe accounts in that CGI needs to be uploaded to the cgi-bin directory rather than the httpdocs directory.

If you don't want to use the cgi-bin directory, you might be able to do an 'AddHandler' directive in a .htaccess to tell the Apache what to do with files ending in .cgi or .pl that don't reside in cgi-bin. I don't remember off-hand what the exact syntax of that directive is or its available options, but you could look that up in the Apache 1.3.27 documentation at http://httpd.apache.org . No guarantees this will work in this case, though. My knowledge of Apache script related directives is a bit fuzzy since I don't deal with it every day. I'd have to go look it up to be certain. I'd be willing to look it up for you during business hours, but I'm at home at the moment and I'm not really supposed to be working. cool.gif

Or, if you send an email request with your specific situation to support@advantagecom.net , they might be able to add a custom config for that site, depending on the circumstances.


--------------------
Sincerely,
Andrew Kinney
CTO, Advantagecom Networks

Please do not private message me. My regular management duties preclude responding to every customer that sends me a support issue. Instead, post on the forum or contact tech support.
PMUsers Website
Top
brucew
Posted: Jun 18 2003, 09:28 AM
Quote Post





Group: Members
Posts: 53
Member No.: 129
Joined: 21-November 02



They used the ScriptAlias to make the URL easier to type, remember and distribute. The code was in their cgi-bin directory, a level or two down.

If you don't know if Rewrite or Redirect will do the same, when I get a chance I can test on my server at home. Just looking for the easy way out wink.gif


--------------------
I am not a complete idiot. Some parts are missing.
PMUsers Website
Top
andy
Posted: Jun 18 2003, 04:21 PM
Quote Post





Group: Advantagecom Staff
Posts: 4,340
Member No.: 9
Joined: 12-July 02



I guess I'm still not sure what exactly is trying to be done here and the importance of the ScriptAlias directive in this particular instance.

Could you give me an example similar the following so I can get a better picture of what your client is trying to do?

visitor accesses http://domain.com/ and files are pulled from /var/www/html

visitor accesses http://domain.com/pathto/somescript.cgi are pulled from /usr/local/somedir/cgi-bin


Or is that way off? The more specifics you can give me about this the more I'll be able to help. I'd hate to spend 3 hours writing a dissertation on how to accomplish what you want just to find out that I didn't have complete information on the intended application and totally wasted my time.

The "easy way out" is for me to figure this out for you, obviously. But I can only do that if you give me enough information to understand what the end goal is.

Instead of asking, "How many rungs should a ladder have?" it would be much more useful to say "I need to get on the roof of the Empire State building. How do I do that?" At least that way I know what you're trying to do so I can suggest the best course of action rather than debating how many rungs the ladder should have. tongue.gif


--------------------
Sincerely,
Andrew Kinney
CTO, Advantagecom Networks

Please do not private message me. My regular management duties preclude responding to every customer that sends me a support issue. Instead, post on the forum or contact tech support.
PMUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll