?
Solved

Web.config / XML error doing a 301 redirect...

Posted on 2011-09-30
1
Medium Priority
?
513 Views
Last Modified: 2012-05-12
I am trying to do a 301 redirect through the web.config file of our website... the URL i am permanently redirecting is a little funky, so that is why I am getting the following error, but can anyone please look at the error and see if there is a way I can get around this and get the URL to work with a 301 redirect?

xml server error
0
Comment
Question by:ausman89
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 1500 total points
ID: 36897882
I do not believe this will work per the error message. I think the reasoning is that you usually redirect the entire page and not based on some parameters in configuration. If it is based on parameters, typically this is done within the dynamic code page itself or via a custom error handling page for 404 error, i.e., invalidate the path so it triggers 404 then hits your custom page that reads the original URL. Since the .NET page can handle that URL (though, usually you have one ? and then other parameters are connected via &) and do your redirection. You should be able to send the response header 301.

Alternatives, you can always try %3F which is the URL encode for ?.

Hope that helps!
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question