| Author |
|
as90876 Newbie

Joined: 23 March 2009
Online Status: Offline Posts: 7
|
| Posted: 23 March 2009 at 8:39am | IP Logged
|
|
|
Hi, I am fairly new to this and I am having a problem with something that seems very simple. I have implemented the rule for hiding a file extension in the .conf file and it works well on all sites except for a few. I thought that this would be a global implementation however it is not applying the rule to applications within a sub directory of another application even if I add a .htaccess file.
http://mysite/home/default.aspx should rewrite to http://mysite/home/default
Home is an application nested under http://mysite/
http://mysite/ is an asp.net 1.1 app http://mysite/home/ is an asp.net 2.0 app
the rule works on all pages in the http://mysite/ applicayion
The sites both work fine and have been working for a few years. I just do not understand why a global setting to hide the file extension would not work on the http://mysite/home/. It seems to be ignoring it. I added an .htaccess file to http://mysite/home/ and tried adding a RewriteBase to it and it still does not work. Here is the code for each file Code for .conf file # Helicon ISAPI_Rewrite configuration file # Version 3.1.0.61
RewriteEngine on
#Redirect extension requests to avoid duplicate content RewriteRule ^([^?]+)\.aspx$ $1 [NC,R=301,L]
#Internally add extensions to request RewriteCond %{REQUEST_FILENAME}.aspx -f RewriteRule (.*) $1.aspx
Code for .htaccess file
# Helicon ISAPI_Rewrite configuration file # Version 3.1.0.61
RewriteEngine on
RewriteBase /home/
#Redirect extension requests to avoid duplicate content RewriteRule ^([^?]+)\.aspx$ $1 [NC,R=301,L]
#Internally add extensions to request RewriteCond %{REQUEST_FILENAME}.aspx -f RewriteRule (.*) $1.aspx
RewriteCond %{HTTPS} (on)? RewriteCond %{HTTP:Host} ^(?!www\.)(.+)$ [NC] RewriteCond %{REQUEST_URI} (.+) RewriteRule .? http(?%1s)://www.%2%3 [R=301,L]
Thanks in advance for your help;
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 23 March 2009 at 10:35am | IP Logged
|
|
|
Please enable logging by putting the following directive into httpd.conf:
RewriteLogLevel 9
LogLevel debug
And please provide rewrite and error log records for the specific non-working request.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
as90876 Newbie

Joined: 23 March 2009
Online Status: Offline Posts: 7
|
| Posted: 23 March 2009 at 7:36pm | IP Logged
|
|
|
There are not errors and it is not even logging requests. I did notice that it is working for Asp.net 1.1 sites but not for 2.0. that seems to really be the issue. why is this? I used the automatic installation. Please advise.
|
| Back to Top |
|
| |
as90876 Newbie

Joined: 23 March 2009
Online Status: Offline Posts: 7
|
| Posted: 23 March 2009 at 7:37pm | IP Logged
|
|
|
It is logging asp.net 1.1 requests but not asp.net 2.0 +. This is definitely the issue. How can we fix this? Thanks.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 24 March 2009 at 8:34am | IP Logged
|
|
|
Please try putting the following rule into .htaccess and comment out the rest of the rules:
RewriteRule .? - [F]
Make some ASP.NET 2.0 request to your site and report the result. Also provide rewrite and IIS log for this request.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
as90876 Newbie

Joined: 23 March 2009
Online Status: Offline Posts: 7
|
| Posted: 24 March 2009 at 8:51am | IP Logged
|
|
|
I did as said and here is the results.
Did not fix the issue
Error log [3/24/2009 09:17:04] C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf - Loaded successfully
Nothing in the rewrite log
It seems as if asp.net 2.0 sites are not even being recognized.
We have 3.5 SP1 installed if that is of any assistance. thanks
|
| Back to Top |
|
| |
as90876 Newbie

Joined: 23 March 2009
Online Status: Offline Posts: 7
|
| Posted: 24 March 2009 at 8:52am | IP Logged
|
|
|
PS. Nothing in the System or Application IIS logs either.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 24 March 2009 at 10:12am | IP Logged
|
|
|
Can you please specify what error did you get with the above rule - 403 Forbidden or 404 Not found?
__________________ Regards,
Anton
|
| Back to Top |
|
| |
as90876 Newbie

Joined: 23 March 2009
Online Status: Offline Posts: 7
|
| Posted: 24 March 2009 at 11:42am | IP Logged
|
|
|
I got no errors at all. It just did not rewrite the URL with the extension. It doesn't seem to be doing anything at all with 2.0 sites. No errors, no logs.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 25 March 2009 at 5:21am | IP Logged
|
|
|
If possible, please provide terminal access to your server.
Or send a copy of your metabase to support@helicontech.com.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
as90876 Newbie

Joined: 23 March 2009
Online Status: Offline Posts: 7
|
| Posted: 25 March 2009 at 2:19pm | IP Logged
|
|
|
Metabase file is on its way now. thanks
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 26 March 2009 at 7:27am | IP Logged
|
|
|
Sorry for giving the wrong reply first.
According to metabase records asp.net 1.1 and 2.0 application pools are configured distinctly:
asp.net 2.0 uses priveleges of AdminWebUser and probably this account doesn't have permissions for ISAPI_Rewrite filter, proxy helper or
config (http://www.helicontech.com/isapi_rewrite/doc/security.htm)
__________________ Regards,
Anton
|
| Back to Top |
|
| |