You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by dugaldcurtis <du...@zoom.co.uk> on 2007/11/04 17:17:11 UTC

[users@httpd] Code Pages Downloadable!

Sorry for asking such a basic question but I am struggling in the transition
from IIS to Apache.

I am using mod_mono and everything works fine.  If I go to
mysite.com/login.aspx I get to my login page etc.

However, if I go to mysite.com//login.aspx (notice the extra slash) it asks
me if I would like to download the aspx page, and when I do it gives me the
raw code.  

What am I doing wrong?  What setting have I missed?  :confused:
-- 
View this message in context: http://www.nabble.com/Code-Pages-Downloadable%21-tf4747449.html#a13574897
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Code Pages Downloadable!

Posted by Sander Temme <sc...@apache.org>.
On Nov 4, 2007, at 8:17 AM, dugaldcurtis wrote:

> What am I doing wrong?  What setting have I missed?  :confused:

It seems that the double slash makes Apache decide to not send the  
request to mod_mono, but to serve the file instead.  I have no  
experience with mod_mono, but how do you tell Apache to send requests  
its way?

S.

-- 
Sander Temme
sctemme@apache.org
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF




Re: [users@httpd] Code Pages Downloadable!

Posted by dugaldcurtis <du...@zoom.co.uk>.

Thanks for the replies.  I think the problem stems from the fact that the
root folder of served pages (mysite.com/) serves php pages (so that I can
run phpmyadmin etc) and then a subfolder (mysite.com/cashless/) serves
asp.net pages.  I have used RewriteRule (thanks) to patch up the problem
while I look at sorting it out.   I think the best way would just be to set
the handler for the whole site to mono.



> 
> I don't know anything in particular about mod_mono. How do you
> activate it and how do you tell it what files to process? Normal
> Apache AddHandler or SetHandler (placed in a <Directory> section)
> would not have that problem.
> 
> You can always work around problems like this with something like
> <LocationMatch //>
> Order allow,deny
> Deny from all
> </LocationMatch>
> 
> Or
> 
> RewriteEngine On
> RewriteRule (.*)//+(.*) $1/$2 [R]
> 
> But it is certainly better to fix the real problem.
> 
> Joshua.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Code-Pages-Downloadable%21-tf4747449.html#a13583472
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Code Pages Downloadable!

Posted by Joshua Slive <jo...@slive.ca>.
On Nov 4, 2007 11:17 AM, dugaldcurtis <du...@zoom.co.uk> wrote:
>
> Sorry for asking such a basic question but I am struggling in the transition
> from IIS to Apache.
>
> I am using mod_mono and everything works fine.  If I go to
> mysite.com/login.aspx I get to my login page etc.
>
> However, if I go to mysite.com//login.aspx (notice the extra slash) it asks
> me if I would like to download the aspx page, and when I do it gives me the
> raw code.
>
> What am I doing wrong?  What setting have I missed?  :confused:

I don't know anything in particular about mod_mono. How do you
activate it and how do you tell it what files to process? Normal
Apache AddHandler or SetHandler (placed in a <Directory> section)
would not have that problem.

You can always work around problems like this with something like
<LocationMatch //>
Order allow,deny
Deny from all
</LocationMatch>

Or

RewriteEngine On
RewriteRule (.*)//+(.*) $1/$2 [R]

But it is certainly better to fix the real problem.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Code Pages Downloadable!

Posted by dugaldcurtis <du...@zoom.co.uk>.
Thanks for the suggestions.

In the end I found that unless the site root was handled by mono (currently
only /cashless/ is handled), the // would continue to cause problems. 
However, this change brought its own problems - php pages stopped being
served correctly and mono started to redirect subfolder pages back to the
root.  In the end, the solution which allowed me to continue serving php
pages correctly and avoid changes to my .net app was just to add:



> <LocationMatch //>
> Order allow,deny
> Deny from all
> </LocationMatch> 
> 

to my apache2.conf.  Probably not the most elegant solution in the world,
but given that the site is internal and not customer facing I think that it
is adequate.
-- 
View this message in context: http://www.nabble.com/Code-Pages-Downloadable%21-tf4747449.html#a13622720
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Code Pages Downloadable!

Posted by Can Le <le...@yahoo.com>.
Hi,

I think you need to update AddHandler  ìn your httpd.conf to use file extension  .aspx as people changed A&#273;Handler to use file .exe ?

Such as: 

AddHandler cgi-script .aspx (example for .exe)

If you can show me how to change icon in file favicon.ico, I copied and changed icon in htdocs but it doesn't work.

Can Le

dugaldcurtis <du...@zoom.co.uk> wrote: 
Sorry for asking such a basic question but I am struggling in the transition aspx 
from IIS to Apache.

I am using mod_mono and everything works fine.  If I go to
mysite.com/login.aspx I get to my login page etc.

However, if I go to mysite.com//login.aspx (notice the extra slash) it asks
me if I would like to download the aspx page, and when I do it gives me the
raw code.  

What am I doing wrong?  What setting have I missed?  :confused:
-- 
View this message in context: http://www.nabble.com/Code-Pages-Downloadable%21-tf4747449.html#a13574897
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See  for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com