Solved

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

Posted on 2011-09-30
1
503 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
1 Comment
 
LVL 59

Accepted Solution

by:
Kevin Cross earned 500 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now