Spaces in substitution
3 posts
• Page 1 of 1
Spaces in substitution
I'm struggling with a situation where we have a number of legacy files with spaces in their filename (e.g. 'Test page.pdf'). Unfortunately due to their age and the history we cannot rename them! I'm attempting to re-write a new name to the old file so:
# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.98
RewriteEngine on
RewriteRule ^/a1file.pdf /Test%20Page.pdf [NC,R=301,L]
but the output is incorrect, the browser is reporting the Requested URL: /Test0Page.pdf
Tried adding NE to the flags but reports exactly the same
Your help would be appreciated
Thanks
# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.98
RewriteEngine on
RewriteRule ^/a1file.pdf /Test%20Page.pdf [NC,R=301,L]
but the output is incorrect, the browser is reporting the Requested URL: /Test0Page.pdf
Tried adding NE to the flags but reports exactly the same
Your help would be appreciated
Thanks
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Spaces in substitution
Hello,
Try using :
Regards
Andrew
Try using :
- Code: Select all
RewriteRule ^/a1file.pdf /Test\%20Page.pdf [NC,R=301,L]
Regards
Andrew
Re: Spaces in substitution
Andrew,
Thanks for this - it didn't quite work but did put me on the route to sorting it out
Doing as ou suggested the browser (Firefox 18.0.2) was attempting to access 'Test%2520Page.pdf'
Adding the NE flag to your solution worked though e.g.
Thanks for your assistance
Paul
Thanks for this - it didn't quite work but did put me on the route to sorting it out
Doing as ou suggested the browser (Firefox 18.0.2) was attempting to access 'Test%2520Page.pdf'
Adding the NE flag to your solution worked though e.g.
- Code: Select all
RewriteRule ^/a1file.pdf /Test\%20Page.pdf [NC,R=301,L,NE]
Thanks for your assistance
Paul
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 10 guests