just an add-on to what preece posted: =)
this may be useful if you're looking to do a little bit more..
http://www.aspnut.com/refe
Main Topics
Browse All TopicsI am creating a database of information on parks and tourism destinations. Then, visitors will be able to learn more about these destinations using ASP pages. So far so good. In the case of major destinations I want to create entire sections of the website specific to the destination. In these cases, I want visitors to be directed to these pages rather than the database served pages.
Here is what I mean.
For most destinations, the database record will include a short description, contact information and a list of things that you can do there.
In other destinations, I may have dozens of pages detailing the site.
I use a step-by step approach visible on http://www.mountainnature.
Here is my idea. Have a yes/no database field called redirect and another one with the url. When the ParkFinderResults.asp page is loaded, if the redirect field is yes, than the page wil be redirected to the page in the url field.
I hope this makes sense. If there is a better way to handle this I would appreciate your help. I can easily pass the Redirect AND the URL parameters from the page prior to ParkFinderResults.asp.
I've got the process working (sort of). I want the UN-redirected page to continue to the asp page using the DestID to identify the record and also passing on the fDestName field. This final field is the name of a destination and may have spaces in the name. Unfortunately, these are converted into %20 rather than + signs. This totally screws everything up. Here is my current code:
<%
RedirectURL = Trim(Replace(Request.Query
If Request.QueryString("Redir
response.redirect (replace(request("URL"), "'", "")) & "?DestID=" & Request.QueryString("DestI
else
response.redirect("ParkFin
end if
%>
The redirected url works perfectly, but the UN-redirecte url is translated as follows:
http://www.mountainnature.
Obviously it's not passing on the field name for fDestName, but it is passing on the value. How can I get rid of the %20 and replace with + AND remove the single quote around the field value
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
just an add-on to what preece posted: =)
this may be useful if you're looking to do a little bit more..
http://www.aspnut.com/refe
Thanks guys. Preece's solution solved part of the problem, but I realized the main point was that I had not added the following: "&fDestName=" so I wasn't giving my fDestName field a string name.
I changed the line that was causing problems to the following:
response.redirect("ParkFin
I tried using the strURL = replace(strURL, "%20", "+") line as well, but it didn't do anything. I still got the %20 in the url, but it doesn't seem to be causing problems. You can try it by going to www.MountainNature.com/Des
I'll give the points to Preece but thanks thinkPaper for the code. I'll keep that handy as I do use this more and more.
>>I tried using the strURL = replace(strURL, "%20", "+") line as well, but it didn't do anything. I still got the %20 in the url, but it doesn't seem to be causing problems.
np =) just wanted to clarify this since I'm not sure if you understood..
http://www.domain.com/my space/my page.html is the same as:
http://www.domain.com/my%2
It will ALWAYS translate this way in the URL. Any special characters are automatically encoded in the URL bc of security purposes. It's part of the RFC standard or something. special characters are considered "unsafe" so it's automatically converted over.
"...Only alphanumerics [0-9a-zA-Z], the special characters "$-_.+!*'()," [not including the quotes - ed], and reserved characters used for their reserved purposes may be used unencoded within a URL."
http://www.blooberry.com/i
This doesn't affect locations of a file or webpage. Only time it would effect something is if you are grabbing the URL and changing/using it for other purposes (i.e. if you want to grab the full URL and display on page so it doesn't show the %20s, etc..)
Business Accounts
Answer for Membership
by: PreecePosted on 2006-12-11 at 07:31:54ID: 18115210
strURL = replace(strURL, "'", "")
strURL = replace(strURL, "%20", "+")
Preece