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: htaccess to rewrite = 404 errors
Author
Message |
Charlie-brm
Newbie


Joined: 09 January 2012
Location: Canada
Posts: 3
Posted: 09 January 2012 at 10:01pm

I have a list of about 50 unique URLs to redirect to asp pages. Recently I switched to a IIS host and had no end of trouble reinstating this website- the redirect is just the most recent thing.
Host: easycgi.com
My site www.luresandtours.com

Previous .htaccess file used with former host
ErrorDocument 404 /error404.html
Redirect /ballyshannoncottage http://www.luresandtours.com/bayofquinte.asp?ItemID=527&CategoryID=209

easycgi.com said to put my modifications to this httpd.ini they put in my site:
[ISAPI_Rewrite]

### subdomain redirect v2 ###
RewriteCond Host:

(?:.+\.)?luresandtours\.com
RewriteCond URL ^/public/(.*)
RewriteCond METHOD GET
RewriteRule

^/public/(.*) /$1 [I,R]
RewriteCond Host: (?:.+\.)?luresandtours\.com
RewriteCond METHOD

POST
RewriteRule ^/public/(.*) /$1
RewriteCond Host: (?:.+\.)?luresandtours\.com
RewriteRule (.*) /public/$1 [I,L]

I added one of my lines to the best of my abilities to try it:
RewriteRule ^/ballyshannoncottage$ /bayofquinte.asp?ItemID=527&CategoryID=209

Error 404

I don't understand the meaning of any of the statements above the redirect I need. Thanks for any help that cuts to the chase.

Back to Top Visit Charlie-brm's Homepage
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 10 January 2012 at 7:25am

What version of ISAPI_Rewrite do you have installed? You currently have v2 syntax, while the topic is in ISAPI_Rewrite 3 branch. These versions have quite different syntax.
Please, double check the version.

Regards
Andrew
Back to Top
 
Charlie-brm
Newbie


Joined: 09 January 2012
Location: Canada
Posts: 3
Posted: 10 January 2012 at 10:44am

ISAPI_REWRITE 3 full version on this account, and it is running on IIS7.

That's direct from the host.
Back to Top Visit Charlie-brm's Homepage
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 11 January 2012 at 8:08am

Well,

This syntax is not correct for ISAPI_Rewrite 3. You'll need to modify the rules to fit requirements.
Please, see FAQ and examples section

Regards
Andrew
Back to Top
 
Charlie-brm
Newbie


Joined: 09 January 2012
Location: Canada
Posts: 3
Posted: 12 January 2012 at 9:50pm

I checked out v3 and I've spent a few evenings trying to get my head around those examples and elsewhere from the 'net. I think I previously lucked out with .htaccess on Apache. I had that going in minutes. I don't want to learn ISAPI_Rewrite. I'm just trying to convert a list of old redirects into RewriteRules and each one is unique.
I have only a guess at what the statements in the default httpd.ini I was handed are doing but Im pretty sure my lines go after all that.

Not working:
RewriteRule ^/wychwood$ /kawarthalakes.asp?ItemID=577&CategoryID=186
RewriteRule ^/blahblah$ /simcoe.asp?ItemID=543&CategoryID=210




Back to Top Visit Charlie-brm's Homepage
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 16 January 2012 at 3:08am

The rules you're having now look good, except, I'd erase the '/' in front of "wychwood" and "blahblah".

Regards
Andrew
Back to Top
 

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

Printable version Printable version