Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP working, except on default doc?

Status
Not open for further replies.

csteinhilber

Programmer
Aug 2, 2002
1,291
US
I'm trying to install a new site on a hosted server. The server is running Apache 1.3.33, though it's capable of running ASP (not exactly sure of the method used).

However, the DirectoryIndex list obviously doesn't include index.asp files. So I created an .htaccess file to set a new DirectoryIndex.

DirectoryIndex index.asp index.html index.htm

Now the index.asp file is served as the default document, but the ASP isn't processed at all (all the ASP code actually displays in the browser). If I implicitly browse to the index.asp page, all is fine.

Anyone know what's going on?

Thanks in advance!
-Carl



-Carl
 
I don't have access to httpd.conf.

Anyone? Anyone?

TIA!


-Carl
 
I think this problem is with your browser. When you specify the page with the .asp extension, it works fine but without it in the url, you get the code. Do you have a second browser you can use to test this such as firefox?

 
Nope, I've tested it in both Firefox and IE. They both exhibit the same behavior. Seems like the issue is the server.

But even if it *was* the browser, I'd still need a solution. I can't dictate which browser visiters to the site will be using.

Right now I have HTML pages installed that do META redirects to the asp pages and it's all working... but it's hardly an optimal solution.


-Carl
 
Maybe the host isn't allowing the .htaccess file to function. Have you tried changing the name of the index.asp to default.asp? I only use php and perl, but I seem to remember that the default page used to be default.xxx. If that doesn't work, call the hosting company. It sounds like the name is the problem.

Mark
 
Right now I have HTML pages installed that do META redirects to the asp pages and it's all working... but it's hardly an optimal solution.

Actually the whole concept of running asp on a linux server is a work-around. It is a module called apache::asp which runs under mod_perl. The standard builds of apache such as those used by distros like redhat are known to have some bugs when running apache::asp. It requires rebuilding apache with some tweaks to fix them. Most hosting providers are unwilling to go through this much trouble when it would be easier to host your site on a Windoze server. Getting back to your problem, I agree that is is looking more like a server issue. When the file type is missing from the request, apache doesn't know how to parse the file. But when the file type such as asp is specified in the header, there is no problem. I would take Kozusnik's advice and contact your hosting provider. They may be able to tell you exactly what you need to put in .htaccess to get things working correctly. You may also want to do a web search for apache::asp. They would have more information related specifically to this module. If you find the answer, you may want to post it here so it can help others with the same problem. If all else fails, there are converters out there that will convert your asp pages to php which is a much better way to go in my opinion.

 
I'm not sure I would call apache:asp a "workaround". It's a "solution". That being said, I do agree that it's not really the proper way to address the issue. I've recommended to the client that the site be moved to a Windows server... but that puts me in a bit of a precarious in that, with the client's current hosting service, Windows-hosted sites are costlier accounts than Linux-hosted sites... so now they're asking me why they need to incur the added expense.

Plus, something like this always eats at me until I know exactly what's causing it and what the fix is. So I'll keep researching to see what I come up with and relay any info here.

And... no... I wouldn't touch an ASP -> PHP converter with a 10 foot pole. But, thanks for the suggestion.



-Carl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top