Last active
February 1, 2016 21:08
-
-
Save dylan-k/6132613 to your computer and use it in GitHub Desktop.
Redirect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
redirect | |
REDIRECT This is some language for use in an .aspx file. It will send a 301 "moved" response and redirect to the location of your choosing. Just change that URL in there to whatever you want. | |
<% | |
Response.Status="301 Moved Permanently" | |
Response.AddHeader ("Location", "http://www.EXAMPLE.com") | |
Response.End() | |
%> | |
...sometimes the URL you're trying to redirect contains a variable. Try something like this | |
<% | |
Response.Status="301 Moved Permanently" | |
Response.AddHeader ("Location", "http://thewalters.org/news/releases/article.aspx?newvariable=" & request.querystring("oldvariable")) | |
%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment