Location uri wildcard

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

What have your tried?
What do your access logs show? What did you expect?

B. R.

I havent tried anything yet.
All I ever did was redirect a single domain.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,250768,250770#msg-250770

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:
http://nginx.org/en/docs

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:
http://forum.nginx.org/read.php?2,250768,250774#msg-250774

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:
http://forum.nginx.org/read.php?2,250768,250796#msg-250796

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/: http://nginx.org/r/rewrite

J

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs