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: Help to rewrite url please
Author
Message |
jma
Newbie


Joined: 16 September 2011
Location: France
Posts: 2
Posted: 16 September 2011 at 10:44am

Hello,

Can you explain me how rewrite this and give the isapirewrite code to place in .conf :

I want this :
http://www.mywebsite.fr/pageweb.asp?pageweb=1
to
http://www.mywebsite.fr/mypage

or
http://www.mywebsite.fr/pageweb.asp?pageweb=2
to
http://www.mywebsite.fr/contact

How can i make this ?
With a map file ? How ?
I can't undesrtand

Thank you very much for you help

JMA
France

Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 19 September 2011 at 7:00am

These simple redirects and rewrite are described in FAQ and examples section
You can do it either with mapfile or customly, creating a rule for each case separately.

Regards
Andrew
Back to Top
 
jma
Newbie


Joined: 16 September 2011
Location: France
Posts: 2
Posted: 23 September 2011 at 6:59am

Hello,

Thank, but it is possible to rewrite this within use a map
file ?
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 23 September 2011 at 7:15am

Definitely! It's gonna be smth like:

RewriteEngine on
RewriteBase /
RewriteMap mapfile txt:mapfile.txt
RewriteMap revmapfile txt:revmapfile.txt
RewriteCond %{QUERY_STRING} ^pageweb=([^&]+)$
RewriteCond ${mapfile:%1|NOT_FOUND} !NOT_FOUND
RewriteRule ^pageweb\.asp$ ${mapfile:%1}? [NC,R=301,L]

RewriteCond ${revmapfile:$1|NOT_FOUND} !NOT_FOUND
RewriteRule ^([^/]+)$ /pageweb.asp?${revmapfile:$1} [NC,L]

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