![]() | ![]() | ![]() |
| |||||||
| Forums | Register | Groups | Awards | Arcade | Pets | T-Bucks / T-Store | Invite Your Friends | Blogs | Mark Forums Read |
| Web Design Forums and discussions on webdesign |
Web Design | |||||||||
|
|
|
|
| |||||
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Civilians | I currently have a dictionary. A user enters a word (say, desk) in the "word" box and gets to http://www.cooldictionary.com/index.mpl?word=desk I want to change them and get them to http://www.cooldictionary.com/word.desk.html I already have mod_rewrite supporting such URLs. What I need is javascript in the form to go to that address. Such as (making it up) onButtonClick ( go to page "http://www.cooldictionary.com/word." + word + ".html" ); Any thoughts? i |
|
| | #2 (permalink) |
| Civilians | And lo, Ignoramus21798 didst speak in alt.www.webmaster: > I currently have a dictionary. > > A user enters a word (say, desk) in the "word" box and gets to > > http://www.cooldictionary.com/index.mpl?word=desk > > I want to change them and get them to > > http://www.cooldictionary.com/word.desk.html > > Any thoughts? Don't. Just make "/index.mpl?word=desk" forward you to "/word.desk.html" using a Location header[1]. People will still be able to just type "/word.whatever.html" to get a definition, but also "/index.mpl?word=whatever" will give the same result. Don't complicate things with a client side script. While you're at it, drop the .html from your redirected URI. "http://www.cooldictionary.com/word.desk" looks much cleaner. Grey [1] Or if index.mpl is your word-info workhorse, rename it something else and have change the rewrites for "/word.whatever.html" to point to it. Your users never need to see the name of this file. Then index.mpl can be your simple Location director. -- The technical axiom that nothing is impossible sinisterly implies the pitfall corollory that nothing is ridiculous. - http://www.greywyvern.com/ringmaker - Orca Ringmaker: Host a web ring from your website! |
|
| | #3 (permalink) |
| Civilians | On Thu, 14 Apr 2005 11:58:39 -0400, GreyWyvern <spam@greywyvern.com> wrote: > And lo, Ignoramus21798 didst speak in alt.www.webmaster: > >> I currently have a dictionary. >> >> A user enters a word (say, desk) in the "word" box and gets to >> >> http://www.cooldictionary.com/index.mpl?word=desk >> >> I want to change them and get them to >> >> http://www.cooldictionary.com/word.desk.html >> >> Any thoughts? > > Don't. Just make "/index.mpl?word=desk" forward you to "/word.desk.html" > using a Location header[1]. People will still be able to just type > "/word.whatever.html" to get a definition, but also > "/index.mpl?word=whatever" will give the same result. Don't complicate > things with a client side script. > > While you're at it, drop the .html from your redirected URI. > "http://www.cooldictionary.com/word.desk" looks much cleaner. > > Grey > > [1] Or if index.mpl is your word-info workhorse, rename it something else > and have change the rewrites for "/word.whatever.html" to point to it. > Your users never need to see the name of this file. Then index.mpl can be > your simple Location director. > All good points. I will do as you say. i |
|
![]() |
| Bookmarks |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Filename in footer | Anthony LeBaron | Microsoft Applications | 1 | 09-14-2005 16:00 |
| Just pull filename | Cardinal | Microsoft Applications | 1 | 07-29-2005 12:00 |
| Function: Filename | MarkC | Microsoft Applications | 4 | 04-23-2005 20:00 |
| VBA Excel Help - Filename | pkruti@hotmail.com | Microsoft Applications | 1 | 03-08-2005 08:00 |
| Inserting Filename? | Bill Allen | Microsoft Applications | 2 | 06-16-2004 01:49 |
![]() | ![]() | ![]() |