This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: Rewrite Works in Dev but not Production
Author
Message |
rrayfield
Newbie


Joined: 20 October 2006
Location: United States
Posts: 8
Posted: 19 October 2011 at 7:46pm

Trying to take domain.com/Default.aspx?m=Atlanta
to
domain.com/Atlanta

Now My rewrite code works on lite version 3.1.0.79 but
not on version 3.1.0.73 on the production server

my code is
RewriteRule /([^/]+) /Default.aspx\?m=$1 [I,L]

I can't figure out this very simple issue. I have other
rules that do work, so the engine is on and working. Any
ideas?

Thanks
Ryan

Edited by rrayfield - 19 October 2011 at 7:49pm
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 20 October 2011 at 2:36am

Please try to have it like this:

RewriteBase /
RewriteRule ^([^/]+)/?$ /Default.aspx\?m=$1 [NC,L]

__________________
Regards,
Anton
Back to Top
 
rrayfield
Newbie


Joined: 20 October 2006
Location: United States
Posts: 8
Posted: 21 October 2011 at 9:20am

Thanks Anton! sorry for the delay but I was sick
yesterday... anyway.

I added your code
RewriteBase /
RewriteRule ^([^/]+)/?$ /Default.aspx\?m=$1 [NC,L]

and still nothing, does not work... 404 error.

I use 2 rules
(this is my complete file)

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.73

RewriteEngine On
RewriteBase

# Defend your computer from some worm attacks
RewriteRule ^.*
(?:global.asa|default\.ida|root\.exe|\.\.).*$ . [NC,F,O]

RewriteCond %{REQUEST_FILENAME} !
(.js|.css|.gif|.jpg|.png|.aspx|.asmx|.axd|.html|.xml)
RewriteRule /([^/]+)/([^/]+)\.htm /Default.aspx\?
m=$1&p=$2 [I,L]
RewriteCond %{REQUEST_FILENAME} !
(.js|.css|.gif|.jpg|.png|.aspx|.asmx|.axd|.html|.xml)
RewriteRule /([^/]+) /Default.aspx\?m=$1

Now this works fine in Dev but not production.... Windows
08 in DEV 03 in Production.

What do you think?

Edited by rrayfield - 21 October 2011 at 9:21am
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 24 October 2011 at 3:27am

Please try to have the whole config looking like this:

RewriteEngine On
RewriteBase /

# Defend your computer from some worm attacks
RewriteRule (?:global.asa|default\.ida|root\.exe|\.\.) - [NC,F,O]

RewriteCond %{REQUEST_FILENAME} !^.*\.(?:js|css|gif|jpg|png|aspx|asmx|axd|html|xml) [NC]
RewriteRule ^([^/]+)/([^/]+)\.htm$ /Default.aspx\?m=$1&p=$2 [NC,L]

RewriteCond %{REQUEST_FILENAME} !^.*\.(?:js|css|gif|jpg|png|aspx|asmx|axd|html|xml) [NC]
RewriteRule ^([^/]+)$ /Default.aspx\?m=$1 [NC,L]



__________________
Regards,
Anton
Back to Top
 
rrayfield
Newbie


Joined: 20 October 2006
Location: United States
Posts: 8
Posted: 24 October 2011 at 10:30am

Thanks for the Info Anton, The file is still working the same way, When I try to access http://www.domain.com/Atlanta I get 404, If I try to access http://www.domain.com/default.aspx?m=Atlanta everything works fine.

On the 2 Parameter rewrite it works just fine.  Same as before.

This is very puzzling to me?  Is there anything else I can test?

If I try your file in Dev (windows 2008) It works great same as my original file.

I have restarted server, check app logs (nothing there), what else!

Thanks for your Time, I think the file is right, what next?

 

Ryan

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 25 October 2011 at 1:13am

Hello, Ryan

Could you please enable logging by putting the following lines into httpd.conf:

RewriteLogLevel 9
LogLevel debug

Then make the testing request (http://www.domain.com/Atlanta) and provide excerpts from rewrite.log and error.log here.

__________________
Regards,
Anton
Back to Top
 
rrayfield
Newbie


Joined: 20 October 2006
Location: United States
Posts: 8
Posted: 25 October 2011 at 5:50pm

Hi Anton, First thanks for helping me wiht this issue.

I have enabled loggin now.  My file looks like this.

# Helicon ISAPI_Rewrite configuration file

# Version 3.1.0.73

RewriteEngine On

RewriteBase /

RewriteLogLevel 9

LogLevel debug

# Defend your computer from some worm attacks

RewriteRule (?:global.asa|default\.ida|root\.exe|\.\.) - [NC,F,O]

RewriteCond %{REQUEST_FILENAME} !^.*\.(?:js|css|gif|jpg|png|aspx|asmx|axd|html|xml) [NC]

RewriteRule ^([^/]+)/([^/]+)\.htm$ /Default.aspx\?m=$1&p=$2 [NC,L]

RewriteCond %{REQUEST_FILENAME} !^.*\.(?:js|css|gif|jpg|png|aspx|asmx|axd|html|xml) [NC]

RewriteRule ^([^/]+)$ /Default.aspx\?m=$1 [NC,L]

 

Located here?

C:\Program Files\Helicon\ISAPI_Rewrite

httpd.parse.errors

the file is blank.? (I did try to visit the url befroe I checked)

Am I looking in the wrong location for the error log?



Edited by rrayfield - 25 October 2011 at 5:52pm
Back to Top
 
rrayfield
Newbie


Joined: 20 October 2006
Location: United States
Posts: 8
Posted: 26 October 2011 at 10:14am

I found the log location...  I used Biloxi-Mississippi as the test parameter. What do you make of it....

99.194.250.77 99.194.250.77  Wed, 26-Oct-2011  11:09:09 GMT [www.mpaccard.com/sid#149749914][rid#20197064/initial] (1) Htaccess process request C:\Components\Helicon\httpd.conf
99.194.250.77 99.194.250.77  Wed, 26-Oct-2011  11:09:09 GMT [www.mpaccard.com/sid#149749914][rid#20197064/initial] (1) Htaccess process request d:\domains\mpaccard\www\.htaccess
99.194.250.77 99.194.250.77  Wed, 26-Oct-2011  11:09:09 GMT [www.mpaccard.com/sid#149749914][rid#20197064/initial] (3) applying pattern '(?:global.asa|default\.ida|root\.exe|\.\.)' to uri 'Biloxi-Mississippi/eurl.axd/ed95d72ddfa377418ee68bd1a05d316d'
99.194.250.77 99.194.250.77  Wed, 26-Oct-2011  11:09:09 GMT [www.mpaccard.com/sid#149749914][rid#20197064/initial] (3) applying pattern '^([^/]+)/([^/]+)\.htm$' to uri 'Biloxi-Mississippi/eurl.axd/ed95d72ddfa377418ee68bd1a05d316d'
99.194.250.77 99.194.250.77  Wed, 26-Oct-2011  11:09:09 GMT [www.mpaccard.com/sid#149749914][rid#20197064/initial] (3) applying pattern '^([^/]+)$' to uri 'Biloxi-Mississippi/eurl.axd/ed95d72ddfa377418ee68bd1a05d316d'

Back to Top
 
rrayfield
Newbie


Joined: 20 October 2006
Location: United States
Posts: 8
Posted: 26 October 2011 at 10:54am

DWORD at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\4.0.30319.0\EnableExtensionlessUrls = 0

I set that and bingo!  it worked

http://blogs.msdn.com/themes/blogs/generic/post.aspx?WeblogApp=tmarq&y=2010&m=06&d=18&WeblogPostName=how-to-disable-the-asp-net-v4-0-extensionless-url-feature-on-iis-6-0&GroupKeys=

Thanks for leading me in the right direction Anton!

Ryan

Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version