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: Please assist with RewriteRules
Author
Message |
ewmccarty
Newbie


Joined: 08 September 2011
Location: United States
Posts: 3
Posted: 12 September 2011 at 8:28am


How can I meet these three conditions?

1. redirect http://www.parkerseminars.com/ to the
http://www.parker.edu/parker_seminars/
2. redirect www.parkerseminars.com/vegas/ to
http://www.parker.edu/vegas/
3. redirect www.parkerseminars.com/win/ to
https://www.cvent.com/events/parker-seminars-las-vegas-
2012/registration-3e11f7b579ba4f1cb16fb25cd8fdd0df.aspx?
r=df383fc2-3851-433e-8a42-62495dcf108b

The following fails to meet condition #1, but when I used
the commented out rule, it fails to meet conditions #2 &
#3

<VirtualHost parkerseminars.com
www.parkerseminars.com parkerseminars.net
www.parkerseminars.net parkerseminars.org
www.parkerseminars.org>
     RewriteEngine on
     AllowOverride none
     # RewriteBase Empty URL-path value means that
rule base will equal to web site root.
     RewriteBase

     # Fix missing slash char on folders
     RewriteRule ^([^.?]+[^.?/])$ $1/ [R,L]

     #Temporary redirect to redirect /vegas/ to vegas
welcome page
     RewriteRule ^/vegas/ http://www.parker.edu/vegas/
[NC,L,NS,R=302]

     #Temporary redirect to redirect /win/ to Las
Vegas CVENT Registration page
     RewriteRule ^/win/
https://www.cvent.com/events/parker-seminars-las-vegas-
2012/registration-3e11f7b579ba4f1cb16fb25cd8fdd0df.aspx?
r=df383fc2-3851-433e-8a42-62495dcf108b [NC,L,NS,R=302]

     #Permanent redirect to update all other links
     #RewriteRule (.+)
http://www.parker.edu/parker_seminars [R=301,L]
     RewriteRule (.+) http://www.parker.edu$1
[R=301,L,NS]
</VirtualHost>


__________________
        __O
       _ \ <,_
....( Θ )/ ( Θ )
Back to Top Visit ewmccarty's Homepage
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 12 September 2011 at 8:52am

Please try to have it the following way:

<VirtualHost parkerseminars.com www.parkerseminars.com parkerseminars.net www.parkerseminars.net parkerseminars.org www.parkerseminars.org>
     RewriteEngine on
     AllowOverride none
     # RewriteBase Empty URL-path value means that rule base will equal to web site root.
     RewriteBase

     # Fix missing slash char on folders
     RewriteRule ^([^.?]+[^.?/])$ $1/ [R,L]

     #redirect http://www.parkerseminars.com/ to the http://www.parker.edu/parker_seminars/
     RewriteRule ^$ http://www.parker.edu/parker_seminars/? [R=301,L,NS]

     #Temporary redirect to redirect /vegas/ to vegas welcome page
     RewriteRule ^/vegas/ http://www.parker.edu/vegas/ [NC,L,NS,R=302]

     #Temporary redirect to redirect /win/ to Las Vegas CVENT Registration page
     RewriteRule ^/win/ https\://www.cvent.com/events/parker-seminars-las-vegas-2012/registration-3e11f7b579ba4f1cb16fb25cd8fdd0df.aspx\?
r=df383fc2-3851-433e-8a42-62495dcf108b [NC,L,NS,R=302]

     #Permanent redirect to update all other links
     RewriteRule (.+) http://www.parker.edu/$1 [R=301,L]
     
</VirtualHost>

__________________
Regards,
Anton
Back to Top
 
ewmccarty
Newbie


Joined: 08 September 2011
Location: United States
Posts: 3
Posted: 12 September 2011 at 9:15am

Thank you you for your reply.

I'm using Release 3.1.0.82. I may need to upgrade to the
latest release.

I've applied the entry as you specify. The /win/ is
working exactly as desired. The /vegas/ is working, but
is going to http://www.parker.edu//chiropractic.aspx?
id=10356 which is the same page, has two slashes in the
URL; it is acceptable. Obviously you noted the 4th
condition that "all other" pages should simply call the
same URL with www.parkerseminars.com replaced with
www.parker.edu; and that too is working.

However the critical issue of
http://www.parkerseminars.com landing on
http://www.parker.edu/parker_seminars/ is still failing.

I have applied the latest ISAPI_Rewrite 3 Full build 0086
for 64 bit, and the problem remains.

Edited by ewmccarty - 12 September 2011 at 9:27am


__________________
        __O
       _ \ <,_
....( Θ )/ ( Θ )
Back to Top Visit ewmccarty's Homepage
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 12 September 2011 at 9:50am

Please try it with one more correction:

<VirtualHost parkerseminars.com www.parkerseminars.com parkerseminars.net www.parkerseminars.net parkerseminars.org www.parkerseminars.org>
     RewriteEngine on
     AllowOverride none
     # RewriteBase Empty URL-path value means that rule base will equal to web site root.
     RewriteBase

     # Fix missing slash char on folders
     RewriteRule ^([^.?]+[^.?/])$ $1/ [R,L]

     #redirect http://www.parkerseminars.com/ to the http://www.parker.edu/parker_seminars/
     RewriteRule ^/?$ http://www.parker.edu/parker_seminars/? [R=301,L,NS]

     #Temporary redirect to redirect /vegas/ to vegas welcome page
     RewriteRule ^/vegas/ http://www.parker.edu/vegas/ [NC,L,NS,R=302]

     #Temporary redirect to redirect /win/ to Las Vegas CVENT Registration page
     RewriteRule ^/win/ https\://www.cvent.com/events/parker-seminars-las-vegas-2012/registration-3e11f7b579ba4f1cb16fb25cd8fdd0df.aspx\?
r=df383fc2-3851-433e-8a42-62495dcf108b [NC,L,NS,R=302]

     #Permanent redirect to update all other links
     RewriteRule (.+) http://www.parker.edu/$1 [R=301,L]
      
</VirtualHost>

If it still doesn't work, please enable logging in httpd.conf as follows:

RewriteLogLevel 9

And show all rewrite.log records for the request to http://www.parkerseminars.com

__________________
Regards,
Anton
Back to Top
 
ewmccarty
Newbie


Joined: 08 September 2011
Location: United States
Posts: 3
Posted: 12 September 2011 at 1:37pm

Apparently I'm having some browser caching issues that
made it seem like things are working when they actually
are not:

The latest revision:

BAD
http://www.parkerseminars.com/ redirects to
http://www.parker.edu/ which has a CMS base URL of
http://www.parker.edu/Chiropractor0.aspx?pageid=18920
instead of http://www.parker.edu/parker-seminars/ or
http://www.parker.edu/chiropractic.aspx?id=1905 which is
the CMS base URL.

GOOD
http://www.parkerseminars.com/vegas redirects to
http://www.parker.edu//chiropractic.aspx?id=10356 which
is http://www.parker.edu/vegas. This is the right page,
but I'm not sure why the CMS is exposing the base url
instead of the Alias, nor why it has a double slash.

GOOD
http://www.parkerseminars.com/win redirects to the
correct landing page https://www.cvent.com/events/parker-
seminars-las-vegas-2012/registration-
3e11f7b579ba4f1cb16fb25cd8fdd0df.aspx?r=df383fc2-3851-
433e-8a42-62495dcf108b

GOOD
http://www.parkerseminars.com/parker_seminars_vegas_speak
er_bios.aspx should redirect to
http://www.parker.edu/parker_seminars_vegas_speaker_bios.
aspx and is actually landing on
http://www.parker.edu/chiropractic.aspx?id=10336 which is
the CMS base URL for the page




Below works as intended. Examining the logs helped.

The problem is that the CMS is translating the URL
http://www.parkerseminars.com/ to
http://www.parkerseminars.com/Default.aspx before the
ISAPI_Rewrite receives the URL: the
"http://www.parkerseminars.com/" cannot be matched
because it is never received.


Code:


<VirtualHost parkerseminars.com www.parkerseminars.com
parkerseminars.net www.parkerseminars.net
parkerseminars.org www.parkerseminars.org>
     RewriteEngine on
     AllowOverride none
     # RewriteBase Empty URL-path value means that rule
base will equal to web site root.
     RewriteBase

     # Fix missing slash char on folders
     RewriteRule ^([^.?]+[^.?/])$ $1/ [R,L]

      # http://www.parkerseminars.com/test
     #RewriteRule ^/test/
http://www.parker.edu/parker_seminars_vegas_speaker_bios.
aspx [R=302,L,NS]
      RewriteRule ^/test/
http://www.parker.edu/parker-seminars-vegas-events.aspx
[NC,R=302,L,NS]

     # http://www.parkerseminars.com/vegas/ to vegas
welcome page
     RewriteRule ^/vegas/ http://www.parker.edu/vegas
[NC,R=302,L,NS]

     # http://www.parkerseminars.com/win/ to Las Vegas
CVENT Registration page
     RewriteRule ^/win/
https://www.cvent.com/events/parker-seminars-las-vegas-
2012/registration-3e11f7b579ba4f1cb16fb25cd8fdd0df.aspx?
r=df383fc2-3851-433e-8a42-62495dcf108b [NC,L,NS,R=302]

     #redirect http://www.parkerseminars.com/ to the
http://www.parker.edu/parker_seminars/
      RewriteRule ^/Default.aspx
http://www.parker.edu/parker-seminars/ [NC,R=301,L,NS]

     #Permanent redirect to update all other links
     RewriteRule (.+) http://www.parker.edu/$1
[NC,R=301,L,NS]

</VirtualHost>



Edited by ewmccarty - 12 September 2011 at 1:55pm


__________________
        __O
       _ \ <,_
....( Θ )/ ( Θ )
Back to Top Visit ewmccarty's Homepage
 

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

Printable version Printable version