I have some links in Google that I now no longer expect to work. All of the links look like this:
www.abc.com/xx/que=xxxxxxxxxxx
Where x can be anything.
Can someone tell me how I can set up a route and controller action that will return a 404 to google? I guess I need to set it up with a mask that includes “que” but I am not so sure how to do this.
Add a new route to the top of your global.asax. This will catch requests of the form
xx/que={anything}using a regular expression to define the “que” argument.This would also assume you have an
ErrorControllerwith actionNotFoundand corresponding view namedNotFound.aspxin your /Views/Error/ directory.