This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: rewriting URLs with spaces
Author
Message |
paulalatifa
Newbie


Joined: 06 May 2011
Posts: 2
Posted: 06 May 2011 at 4:48am

Hi,

I'm sorry if this has been asked before. I've searched all day, and have been reading so much but can't seem to find the answer and am a complete newbie to ISAPI rewrite.

I've rebuild a website for someone who had very very ugly URLs to a Wordpress site that has (almost) pretty URLs. My problem is that his URLs  are so full with spaces, commas etc that I don't know how to encode this. Fortunately he didn't have many pages so I decided to redirect each URL seperately. This is what I've got so far:

Code:


[ISAPI_Rewrite]

# This is a comment

# 300 = 5 minutes
CacheClockRate 300
RepeatLimit 20

# Block external access to the httpd.ini and httpd.parse.errors files
RewriteRule /httpd(?:\.ini|\.parse\.errors) / [F,I,O]

# Block external access to the Helper ISAPI Extension
RewriteRule .*\.isrwhlp / [F,I,O]

# Rewriterules

RewriteCond Host: (?!www\.)corvanrongen\.nl(.*)
RewriteRule (.*) http://www.corvanrongen.nl$2 [I,RP]

RewriteRule /lesrooster\.htm http://www.corvanrongen.nl/index.php/lesrooster/ [I,O,RP]

RewriteRule /wedstrijduitsl*gen\.htm http://www.corvanrongen.nl/index.php/nieuws/wedstrijd/ [I,O,RP]

RewriteRule /dansavonden\ en\ evenementen\.htm http://www.corvanrongen.nl/index.php/dansavond/ [I,O,RP,L]

RewriteRule /foto\'s\,\ video\ \&\ funstuff\.htm http://www.corvanrongen.nl/index.php/fotos/ [I,O,RP]

RewriteRule /nieuws\ &\ actualiteiten\.htm http://www.corvanrongen.nl/index.php/nieuws/ [I,O,RP]



The first two (lesrooster.htm and wedstrijduitsl*gen.htm) work fine. Everything with spaces and other stuff doesn't work. Can someone help?
Any help will be much appreciated!!!!

Back to Top Visit paulalatifa's Homepage
 
paulalatifa
Newbie


Joined: 06 May 2011
Posts: 2
Posted: 06 May 2011 at 1:13pm

Okay, after puzzling and puzzling this now seems to work for me:

Code:

[ISAPI_Rewrite]
# This is a comment
# 300 = 5 minutes
CacheClockRate 300
RepeatLimit 20
# Block external access to the httpd.ini and httpd.parse.errors files
RewriteRule /httpd(?:\.ini|\.parse\.errors) / [F,I,O]
# Block external access to the Helper ISAPI Extension
RewriteRule .*\.isrwhlp / [F,I,O]
# Rewriterules
RewriteCond Host: (?!www\.)corvanrongen\.nl(.*)
RewriteRule (.*) http://www.corvanrongen.nl$2 [I,RP]
RewriteRule /lesrooster\.htm http://www.corvanrongen.nl/index.php/lesrooster/ [I,O,RP]
RewriteRule /wedstrijduitsl*gen\.htm http://www.corvanrongen.nl/index.php/nieuws/wedstrijd/ [I,O,RP]
RewriteRule /dansavonden[\s]en[\s]evenementen(.*)$ http://www.corvanrongen.nl/index.php/dansavond/ [I,O,RP]
RewriteRule /foto[']s[,][\s]video[\s]&[\s]funstuff(.*)$ http://www.corvanrongen.nl/index.php/fotos/ [I,O,RP]
RewriteRule /nieuws[\s]&[\s]actualiteiten(.*)$ http://www.corvanrongen.nl/index.php/nieuws/ [I,O,RP,L]


Hope this helps other people.
Back to Top Visit paulalatifa's Homepage
 

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

Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum