This forum has been moved here:
Helicon Tech Community Forum

Helicon Ape (Forum Locked Forum Locked)
 Helicon Tech : Helicon Ape
Subject Topic: Upgrade from ISAPI_Rewrite to APE broke
Author
Message |
taborro
Newbie


Joined: 16 August 2010
Location: United States
Posts: 6
Posted: 16 August 2010 at 4:56pm

Hi, we were running ISAPI_Rewrite, but upgraded to APE today to get additional functionality (mod_hotlink). 

However, our .htaccess that worked under ISAPI_Rewrite is no longer working.  We're trying to take this link:

http://www.learnvisualstudio.net/111.html

And apply it against these rules:

Code:

# Forced Tier Linking Code
RewriteRule ^/signup-([0-9]+).html$ http://affiliate\.LearnVisualStudio\.NET/signup\.php\?ref=$1 [R,L]

# TextAds
RewriteRule ^/([0-9]+)-([a-z]+)-([0-9]+).html$ http://affiliate\.LearnVisualStudio\.NET/idevads\.php\?id=$1&ad=$3 [R,L]
RewriteRule ^/([0-9]+)-([a-z]+)-([0-9]+)-([0-9]+).html$ http://affiliate\.LearnVisualStudio\.NET/idevads\.php\?id=$1&ad=$3&page=$4 [R,L]

# Custom Links
RewriteRule ^/([0-9]+)-([a-zA-Z0-9-]+)-([0-9]+)-url.html$ http://affiliate\.LearnVisualStudio\.NET/idevaffiliate\.php\?id=$1&keyword=$2&url=$3 [R,L]
RewriteRule ^/([0-9]+)-([a-zA-Z0-9-]+)-([0-9]+)-custom.html$ http://affiliate\.LearnVisualStudio\.NET/idevaffiliate\.php\?id=$1&keyword=$2&custom=$3 [R,L]

# Standard Links
RewriteRule ^/([0-9]+).html$ http://affiliate\.LearnVisualStudio\.NET/idevaffiliate\.php\?id=$1 [R,L]
RewriteRule ^/([0-9]+)-([0-9]+).html$ http://affiliate\.LearnVisualStudio\.NET/idevaffiliate\.php\?id=$1&page=$2 [R,L]
RewriteRule ^/([0-9]+)-([0-9]+)-([0-9]+).html$ http://affiliate\.LearnVisualStudio\.NET/idevaffiliate\.php\?id=$1&page=$2&set=$3 [R,L]
RewriteRule ^/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$ http://affiliate\.LearnVisualStudio\.NET/idevaffiliate\.php\?id=$1&page=$2&set=$3&link=$4 [R,L]
RewriteRule ^/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([a-zA-Z]+).html$ http://affiliate\.LearnVisualStudio\.NET/idevaffiliate\.php\?id=$1&page=$2&set=$3&link=$4&keyword=$5 [R,L]
RewriteRule ^/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([a-zA-Z]+)-([0-9]+).html$ http://affiliate\.LearnVisualStudio\.NET/idevaffiliate\.php\?id=$1&page=$2&set=$3&link=$4&keyword=$5&custom=$6 [R,L]
RewriteRule ^/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([a-zA-Z]+)-([0-9]+)-([0-9]+).html$ http://affiliate\.LearnVisualStudio\.NET/idevaffiliate\.php\?id=$1&page=$2&set=$3&link=$4&keyword=$5&custom=$6&url=$7 [R,L]


But when we do, we get a 404 ... it should split out the HTML file name and send it to our affiliate logging app (which then redirects back to our home page).

It seems like IIS7 might not know that .NET is responsible for the .html page?  Just a guess ... it seems to be looking for an actual file called 111.html on the file system (thus the 404).  How can we fix this?
Thank you!
Bob
Back to Top Visit taborro's Homepage
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 17 August 2010 at 2:50am

Have you put the

RewriteEngine on

at the top of the config?
It's optional in ISAPI_Rewrite though essential in Ape.

__________________
Regards,
Anton
Back to Top
 
taborro
Newbie


Joined: 16 August 2010
Location: United States
Posts: 6
Posted: 17 August 2010 at 7:56am

Yes, I did ... here's the entire NEW .htaccess (I replaced the registration info with XXX):

Code:

# Helicon Ape version 3.0.0.46

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.73
# Registration info
RegistrationName= XXX XXXXX
RegistrationCode= XXXXX-XXXXX-XXXXX-XXXXX


# Start iDevAffiliate SEO Code

RewriteEngine on
RewriteBase /

RewriteLog "D:\LOGS\rewrite.log"

# Forced Tier Linking Code
RewriteRule ^/signup-([0-9]+).html$ http://affiliate\.LearnVisualStudio\.NET/signup\.php\?ref=$1 [R,L]

# TextAds
RewriteRule ^/([0-9]+)-([a-z]+)-([0-9]+).html$ http://affiliate\.LearnVisualStudio\.NET/idevads\.php\?id=$1&ad=$3 [R,L]
RewriteRule ^/([0-9]+)-([a-z]+)-([0-9]+)-([0-9]+).html$ http://affiliate\.LearnVisualStudio\.NET/idevads\.php\?id=$1&ad=$3&page=$4 [R,L]

# Custom Links
RewriteRule ^/([0-9]+)-([a-zA-Z0-9-]+)-([0-9]+)-url.html$ http://affiliate\.LearnVisualStudio\.NET/idevaffiliate\.php\?id=$1&keyword=$2&url=$3 [R,L]
RewriteRule ^/([0-9]+)-([a-zA-Z0-9-]+)-([0-9]+)-custom.html$ http://affiliate\.LearnVisualStudio\.NET/idevaffiliate\.php\?id=$1&keyword=$2&custom=$3 [R,L]

# Standard Links
RewriteRule ^/([0-9]+).html$ http://affiliate\.LearnVisualStudio\.NET/idevaffiliate\.php\?id=$1 [R,L]
RewriteRule ^/([0-9]+)-([0-9]+).html$ http://affiliate\.LearnVisualStudio\.NET/idevaffiliate\.php\?id=$1&page=$2 [R,L]
RewriteRule ^/([0-9]+)-([0-9]+)-([0-9]+).html$ http://affiliate\.LearnVisualStudio\.NET/idevaffiliate\.php\?id=$1&page=$2&set=$3 [R,L]
RewriteRule ^/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$ http://affiliate\.LearnVisualStudio\.NET/idevaffiliate\.php\?id=$1&page=$2&set=$3&link=$4 [R,L]
RewriteRule ^/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([a-zA-Z]+).html$ http://affiliate\.LearnVisualStudio\.NET/idevaffiliate\.php\?id=$1&page=$2&set=$3&link=$4&keyword=$5 [R,L]
RewriteRule ^/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([a-zA-Z]+)-([0-9]+).html$ http://affiliate\.LearnVisualStudio\.NET/idevaffiliate\.php\?id=$1&page=$2&set=$3&link=$4&keyword=$5&custom=$6 [R,L]
RewriteRule ^/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([a-zA-Z]+)-([0-9]+)-([0-9]+).html$ http://affiliate\.LearnVisualStudio\.NET/idevaffiliate\.php\?id=$1&page=$2&set=$3&link=$4&keyword=$5&custom=$6&url=$7 [R,L]


# End iDevAffiliate SEO Code

SetEnv mod_hotlink
<FilesMatch \.(swf)$>
HotlinkProtect /flowplayer [ Referer ]
HotlinkAllow Referer http://www.learnvisualstudio.net
HotlinkAllow Referer http://websitespark.learnvisualstudio.net
HotlinkAllow Referer ^$
</FilesMatch>

#SetEnv mod_developer secure-key-617477959


I added the RewriteLog instruction to help debug the problem, but it doesn't seem to run either.  However, the Hotlink instructions at the end of the file definitely work.
Back to Top Visit taborro's Homepage
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 18 August 2010 at 2:43am

"here's the entire NEW .htaccess"
- are you sure it's .htaccess? The thing is that reg credentials are usually put into the global httpd.conf file.
- Also with the rules you have please try to set empty RewriteBase (remove slash after it).

__________________
Regards,
Anton
Back to Top
 
taborro
Newbie


Joined: 16 August 2010
Location: United States
Posts: 6
Posted: 18 August 2010 at 6:21pm

Thank you, I removed the credentials (leftovers from the .htaccess used in the ISAPI_Reqrite) and set the RewriteBase as you suggested and it works now.
Back to Top Visit taborro's Homepage
 

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

Printable version Printable version