I recently converted my website from asp.net and have the following
links
out there that I would like to permanent redirect to my new url, but I
seem
to not be able to create this. My goal is to create one rewrite or
something that can handle all of these.
The old urls are as follows.
http://www.mysite.com/(X(1)S(kt54xgv5mfifsmkgxo5eqk2m))/ClassScheduler.aspx?AspxAutoDetectCookieSupport=1
http://www.mysite.com/(X(1)S(kt54xgv5mfifsmkgxo5eqk2m))/ClassScheduler.aspx
http://www.mysite.com/ClassScheduler.aspx
I havent tried anything yet.
All I ever did was redirect a single domain.
Posted at Nginx Forum:
Well, that is maybe why you have not received any help and might not
receive some.
No effort, no problem, no help.
http://www.catb.org/esr/faqs/smart-questions.html#before
If you wanna learn about configuring nginx, a good head start is the
official documentation:
nginx documentation
B. R.
Keep in mind this ML (and other places such as StackOverfflow or
whatever
fora are still open to help you if you are struggling on anything.
People are usually glad to help others who demonstrated efforts in
thinking
about it and who provided details about their approach of the problem.
That is, based on the docs, try to make a solution on your own.
Once you hit the wall, and if all the docs you could find (nginx docs,
Web
search are a start) do not help you further, please come back with
details
of the process you followed.
Doors might open this time. :o)
B. R.
Ah, gotcha, I am new to this and thanks for the link to this
documentation.
I will close this thread.
Posted at Nginx Forum:
I actually was looking around on google for the solution, but I lazied
out
and came here, but I ended up finding the solution for this, buy getting
myself familiar with regex. I used the following command to do this to
maybe
help someone else needing this.
location ~* “\bClassScheduler.aspx\b” {
rewrite ^ http://www.mysite.com/classScheduler/? permanent;
}
Posted at Nginx Forum:
On 10 June 2014 17:31, grd2345 [email protected] wrote:
http://www.mysite.com/ClassScheduler.aspx
[snip]
I basically need a wild card to detect ClassScheduler.aspx from the above
old urls
This assumption looks wrong. Check out how location stanzas work:
http://nginx.org/r/location
Hint: locations in their simplest state just match path prefixes …
Also check the first parameter that a “rewrite” takes … consider if
you could use this functionality to avoid specifying a location
/entirely/: Module ngx_http_rewrite_module
J