| Author |
|
paulalatifa Newbie

Joined: 06 May 2011
Online Status: Offline Posts: 2
|
| Posted: 06 May 2011 at 4:48am | IP Logged
|
|
|
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 |
|
| |
paulalatifa Newbie

Joined: 06 May 2011
Online Status: Offline Posts: 2
|
| Posted: 06 May 2011 at 1:13pm | IP Logged
|
|
|
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 |
|
| |
|
|