• 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: Shortest URL Possible???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shortest URL Possible???


  • Subject: Re: Shortest URL Possible???
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 14 Jul 2003 08:07:07 -0700

Wow.  That custom 404 page is by far the outright nastiest hack I've heard
of in some time!  Wow.

If you are using Apache, read up on Rewrite Rules.  Get some sleep first,
the docs are not gentle.  :-)

To do what you want, you would use a rule like this:

RewriteEngine  on
RewriteRule    ^/([A-Z]+)$ /cgi-bin/WebObjects/MyApp.woa/wa/Confirm?id=$1
[last,passthrough]

Make sure that you load mod_webobjects before mod_rewrite in the Apache
conf file for this to work.


Chuck


At 04:15 AM 14/07/2003 -0400, Goodbye Bill wrote:
>What is the shortest possible URL I can use with WebObjects to give my user
>a confirmation link?  I realize I can use a DirectAction, but I would like
>to have a shorter/simpler URL.
>
>As it stands, this is what I have in my WebObjects application:
>
>     http://www.myapp.com/cgi-bin/WebObjects/MyApp.woa/wa/Confirm?id=ABCDEF
>
>This is just WAY too long!  How can I get it shorter?  As you can see from
>the example below I am willing to code some work-arounds if I have to.
>
>EXAMPLE:
>In a previous .NET application, when a user signed up, I sent him the
>following type of URL to confirm his email address...
>
>     Primary URL Example:
>     http://www.myapp.com/ABCDEF
>
>     These would have also worked:
>     http://www.myapp.com/confirm.aspx?ABCDEF
>     http://www.myapp.com/confirm.aspx?id=ABCDEF
>
>HOW IT WORKED:
>The first example used a custom 404 error page and stripped apart the entire
>URL in the user's browser.  If it appeared to be a confirmation code, the
>code would be passed to the logic in the "confirm.aspx" page.  That page
>would then parse the query string and perform based on the query string.
>
>Thanks!  =S
>_______________________________________________
>webobjects-dev mailing list | email@hidden
>Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>Do not post admin requests to the list. They will be ignored.
>

--

Chuck Hill                                 email@hidden
Global Village Consulting Inc.             http://www.global-village.net
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Shortest URL Possible??? (From: Goodbye Bill <email@hidden>)

  • Prev by Date: RE: Pop-up menus in Nib Files
  • Next by Date: RE: Pop-up menus in Nib Files
  • Previous by thread: Re: Shortest URL Possible???
  • Next by thread: {FINISHED} Help please _obtainOpenChannel error - Further INFO
  • Index(es):
    • Date
    • Thread