• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: URL re-writing at the root of the domain
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: URL re-writing at the root of the domain


  • Subject: Re: URL re-writing at the root of the domain
  • From: Ted Archibald <email@hidden>
  • Date: Fri, 11 Jan 2013 13:19:58 -0600

Although I'm not running at the root domain I did write a rewrite rule so that Rest routes are cleaner (i.e. no /ra crap).  I just added a bunch of exceptions to the regex, which solved my problems with multiple request handlers.

e.g.

RewriteRule ^AppName/([0-9]*/)?(?!(?:[0-9]*/)?ajax/|(?:[0-9]*/)?wis/|(?:[0-9]*/)?_wr_/|(?:[0-9]*/)?_sl_/|(?:[0-9]*/)?wa/|(?:[0-9]*/)?ra/|(?:[0-9]*/)?womp/|(?:[0-9]*/)?ja/|(?:[0-9]*/)?wo/|(?:[0-9]*/)?push/|(?:[0-9]*/)?wr/|(?:[0-9]*/)?ws/|(?:[0-9]*/)?erxadm/|(?:[0-9]*/?)?$)(.*)$ /cgi-bin/WebObjects/AppName.woa/$1ra/$2 [NC,PT,L]

RewriteRule ^AppName/([0-9]*/)?(ajax/|wis/|_wr_/|_sl_/|wa/|ra/|womp/|ja/|wo/|push/|wr/|ws/|erxadm/|(?:[0-9]*/))(.*)$ /cgi-bin/WebObjects/AppName.woa/$1$2$3 [NC,PT,L]

RewriteRule ^AppName(/[0-9]*)?$ /cgi-bin/WebObjects/AppName.woa [NC,PT,L]

On Thu, Jan 10, 2013 at 12:21 AM, Paul Hoadley <email@hidden> wrote:
Hi George,

On 10/01/2013, at 3:45 PM, George Domurot <email@hidden> wrote:

This line doesn't look right:
RewriteRule ^/(.*)$ /Apps/WebObjects/SomeApp.woa$1 [PT,L]

Shouldn't it include a slash before "$1"?
RewriteRule ^/(.*)$ /Apps/WebObjects/SomeApp.woa/$1 [PT,L]

I haven't tried it, but it should work.

Well spotted, you're completely right.  (Testing didn't get far enough to expose this bug, as I can't log in yet.)

If the URLs then work, but not once you're in the app, then you'll want to dig into the auto rewrite are of Wonder and see what it's doing when the replace is only equal to "/".

Yeah, that's next up.  Has anyone done this?  Is anyone deploying an app at the apex of some domain name like this?


-- 
Paul Hoadley
http://logicsquad.net/




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >URL re-writing at the root of the domain (From: Paul Hoadley <email@hidden>)
 >Re: URL re-writing at the root of the domain (From: George Domurot <email@hidden>)
 >Re: URL re-writing at the root of the domain (From: Paul Hoadley <email@hidden>)

  • Prev by Date: Re: Wonder 6.0.0 is out in the wild!
  • Next by Date: Re: Wonder 6.0.0 is out in the wild!
  • Previous by thread: Re: URL re-writing at the root of the domain
  • Next by thread: Apache ErrorDocument and the query string
  • Index(es):
    • Date
    • Thread