nicer url thoughts?

Discussion in 'HTML' started by Paul Furman, Jul 26, 2007.

  1. Paul Furman

    Paul Furman Guest

    I've been going through doing some search engine friendliness updates
    with rewrite rules and would like to clean up some php query strings
    like ?PG=2&PIC=5

    I'm thinking /2/5 is not going to work because I have folders named /2
    in some cases so maybe it's more like /2~5 but that's just weird using
    funny characters or /pg2#5

    You'd think I could come up with something decent but I'm just not sure.
    Any suggestions?


    For now my links look like this:
    http://www.edgehill.net/1/?SC=go.php&DIR=0_gallery/0-Photo-Update/2007-06-24&PG=1&PIC=1
    I've got it down to this (not uploaded yet):
    http://www.edgehill.net/1/gallery/photo-update/2007-06-24?PG=1&PIC=1
    and soon I'll have this:
    http://www.edgehill.net/gallery/photo-update/2007-06-24?PG=1&PIC=1

    Also, is there any reason not to chop off the www:
    http://edgehill.net/gallery/photo-update/2007-06-24

    Oh, and I could change 2007-06-24 to 6-24-07

    So the final urls would look like:
    http://edgehill.net/gallery/photo-update/6-24-07/pg2#5
    .... or whatever looks best on the page & pic numbers...

    Thanks for your ideas,

    --
    Paul Furman Photography
    http://www.edgehill.net/1
    Paul Furman, Jul 26, 2007
    #1
    1. Advertising

  2. Paul Furman

    Paul Furman Guest

    Paul Furman wrote:
    > I've been going through doing some search engine friendliness updates
    > with rewrite rules and would like to clean up some php query strings
    > like ?PG=2&PIC=5
    >
    > I'm thinking /2/5 is not going to work because I have folders named /2
    > in some cases


    You know, I can work around this so nevermind. I think /2/5 is the most
    straightforward way to handle it unless someone disagrees

    > so maybe it's more like /2~5 but that's just weird using
    > funny characters or /pg2#5
    >
    > You'd think I could come up with something decent but I'm just not sure.
    > Any suggestions?
    >
    >
    > For now my links look like this:
    > http://www.edgehill.net/1/?SC=go.php&DIR=0_gallery/0-Photo-Update/2007-06-24&PG=1&PIC=1
    >
    > I've got it down to this (not uploaded yet):
    > http://www.edgehill.net/1/gallery/photo-update/2007-06-24?PG=1&PIC=1
    > and soon I'll have this:
    > http://www.edgehill.net/gallery/photo-update/2007-06-24?PG=1&PIC=1
    >
    > Also, is there any reason not to chop off the www:
    > http://edgehill.net/gallery/photo-update/2007-06-24
    >
    > Oh, and I could change 2007-06-24 to 6-24-07
    >
    > So the final urls would look like:
    > http://edgehill.net/gallery/photo-update/6-24-07/pg2#5
    > ... or whatever looks best on the page & pic numbers...
    >
    > Thanks for your ideas,
    >



    --
    Paul Furman Photography
    http://www.edgehill.net/1
    Bay Natives Nursery
    http://www.baynatives.com
    Paul Furman, Jul 26, 2007
    #2
    1. Advertising

  3. Paul Furman

    Paul Furman Guest

    Paul Furman wrote:

    > Paul Furman wrote:
    >
    >> I've been going through doing some search engine friendliness updates
    >> with rewrite rules and would like to clean up some php query strings
    >> like ?PG=2&PIC=5
    >>
    >> I'm thinking /2/5 is not going to work because I have folders named /2
    >> in some cases

    >
    > You know, I can work around this so nevermind. I think /2/5 is the most
    > straightforward way to handle it unless someone disagrees


    Ack scratch that, it *IS* a problem I'm going to implement it as /pg1pc5
    but if you got better ideas I can change that. Apparently # is a special
    character for browsers.


    >> so maybe it's more like /2~5 but that's just weird using funny
    >> characters or /pg2#5
    >>
    >> You'd think I could come up with something decent but I'm just not
    >> sure. Any suggestions?
    >>
    >>
    >> For now my links look like this:
    >> http://www.edgehill.net/1/?SC=go.php&DIR=0_gallery/0-Photo-Update/2007-06-24&PG=1&PIC=1
    >>
    >> I've got it down to this (not uploaded yet):
    >> http://www.edgehill.net/1/gallery/photo-update/2007-06-24?PG=1&PIC=1
    >> and soon I'll have this:
    >> http://www.edgehill.net/gallery/photo-update/2007-06-24?PG=1&PIC=1
    >>
    >> Also, is there any reason not to chop off the www:
    >> http://edgehill.net/gallery/photo-update/2007-06-24
    >>
    >> Oh, and I could change 2007-06-24 to 6-24-07
    >>
    >> So the final urls would look like:
    >> http://edgehill.net/gallery/photo-update/6-24-07/pg2#5
    >> ... or whatever looks best on the page & pic numbers...
    >>
    >> Thanks for your ideas,
    >>

    >
    >



    --
    Paul Furman Photography
    http://www.edgehill.net/1
    Bay Natives Nursery
    http://www.baynatives.com
    Paul Furman, Jul 26, 2007
    #3
  4. Paul Furman

    J.O. Aho Guest

    Paul Furman wrote:
    > I've been going through doing some search engine friendliness updates
    > with rewrite rules and would like to clean up some php query strings
    > like ?PG=2&PIC=5


    This will increase the load on your web server, IMHO it's better that search
    engines gets more friendly to URLs than web sites to adjust due searchengines
    has trouble of indexing pages correctly.

    > I'm thinking /2/5 is not going to work because I have folders named /2
    > in some cases so maybe it's more like /2~5 but that's just weird using
    > funny characters or /pg2#5


    Sure you could do that, or just add a character in front that you don't
    usually use, as you use rewrite_mod, it handles reg expressions will.


    Keep in mind you may get troubles if you use relative paths to images and
    links on your own site.

    --

    //Aho
    J.O. Aho, Jul 26, 2007
    #4
  5. Paul Furman

    Paul Furman Guest

    J.O. Aho wrote:

    > Paul Furman wrote:
    >
    >>I've been going through doing some search engine friendliness updates
    >>with rewrite rules and would like to clean up some php query strings
    >>like ?PG=2&PIC=5

    >
    > This will increase the load on your web server, IMHO it's better that search
    > engines gets more friendly to URLs than web sites to adjust due searchengines
    > has trouble of indexing pages correctly.


    Yes I already torture my poor server in other worse ways though :) I
    also want this to make the urls shorter for emailing links. I totally
    agree the search engines are not reasonable about ignoring php content,
    in fact they don't always ignore it but apparently it hurts a lot.

    >>I'm thinking /2/5 is not going to work because I have folders named /2
    >>in some cases so maybe it's more like /2~5 but that's just weird using
    >>funny characters or /pg2#5

    >
    > Sure you could do that, or just add a character in front that you don't
    > usually use, as you use rewrite_mod, it handles reg expressions will.


    For now I'm thinking /pg2pc5 it could be /~2~5 but that's an awkward
    character for people to type... maybe /p2~5 ...shortness is important to
    my goals. Sometimes I will just give the page number so /pg2 /p2

    > Keep in mind you may get troubles if you use relative paths to images and
    > links on your own site.


    Yep, I've been dealing with that already with the rewrite rules I've
    implemented so far. It wasn't too bad and the nice thing is except for
    that, all the old ugly urls will continue to function. What I had to
    change was relative urls that didn't start at the root, I had everything
    under /1 & the index.php loaded under /1 so I had left out the /1 on
    many but those are almost all easily corrected in the php building or
    html, just a few exceptions are broken hard coded links in the
    annotation under some photos.

    --
    Paul Furman Photography
    http://www.edgehill.net/1
    Bay Natives Nursery
    http://www.baynatives.com
    Paul Furman, Jul 26, 2007
    #5
  6. Paul Furman

    J.O. Aho Guest

    Paul Furman wrote:
    > J.O. Aho wrote:
    >
    >> Paul Furman wrote:
    >>
    >>> I've been going through doing some search engine friendliness updates
    >>> with rewrite rules and would like to clean up some php query strings
    >>> like ?PG=2&PIC=5

    >>
    >> This will increase the load on your web server, IMHO it's better that
    >> search
    >> engines gets more friendly to URLs than web sites to adjust due
    >> searchengines
    >> has trouble of indexing pages correctly.

    >
    > Yes I already torture my poor server in other worse ways though :) I
    > also want this to make the urls shorter for emailing links. I totally
    > agree the search engines are not reasonable about ignoring php content,
    > in fact they don't always ignore it but apparently it hurts a lot.


    Why not use tinyurl ?


    >>> I'm thinking /2/5 is not going to work because I have folders named /2
    >>> in some cases so maybe it's more like /2~5 but that's just weird using
    >>> funny characters or /pg2#5

    >>
    >> Sure you could do that, or just add a character in front that you don't
    >> usually use, as you use rewrite_mod, it handles reg expressions will.

    >
    > For now I'm thinking /pg2pc5 it could be /~2~5 but that's an awkward
    > character for people to type... maybe /p2~5 ...shortness is important to
    > my goals. Sometimes I will just give the page number so /pg2 /p2


    No, ~ is a bad character to use, it's usually used to tell that the webserver
    should look in the user directory for the pages.

    page.php/q2/5

    This way you could use the 'q' to tell that the following is just an argument
    for the php script and not directories.


    --

    //Aho
    J.O. Aho, Jul 26, 2007
    #6
  7. Paul Furman

    Paul Furman Guest

    J.O. Aho wrote:

    > Why not use tinyurl ?


    I do, it's a pain... also people have trouble copying my long links.

    > ~ is a bad character to use, it's usually used to tell that the webserver
    > should look in the user directory for the pages.


    OK thanks.

    --
    Paul Furman Photography
    http://www.edgehill.net/1
    Bay Natives Nursery
    http://www.baynatives.com
    Paul Furman, Jul 26, 2007
    #7
  8. On 26 Jul 2007 Paul Furman wrote in alt.html

    >> Why not use tinyurl ?

    >
    > I do, it's a pain... also people have trouble copying my long links.


    go get your own short url maker script.
    http://www.gentlesource.com/

    That's what's on my site. Even has a bookmarklet ror your toolbar like
    tinyurl. On my site it is "Pets's Bookmarklet". Drag it up and give it a test
    run.

    --
    D?
    Yorkshire Pete
    http://yorkshirepete.com/
    Yorkshire Pete, Jul 26, 2007
    #8
  9. Paul Furman

    Paul Furman Guest

    Yorkshire Pete wrote:
    > On 26 Jul 2007 Paul Furman wrote in alt.html
    >
    >>>Why not use tinyurl ?

    >>
    >>I do, it's a pain... also people have trouble copying my long links.

    >
    > go get your own short url maker script.
    > http://www.gentlesource.com/
    >
    > That's what's on my site. Even has a bookmarklet ror your toolbar like
    > tinyurl. On my site it is "Pets's Bookmarklet". Drag it up and give it a test
    > run.



    For $20 that sounds nifty but I don't have mysql running on that domain
    (yet). Neat idea though. It would be nice to be able to permalink short
    urls to any page.

    I've pretty much got this worked out now with the shorter dates, no www,
    /pg2pc5 for page & pic number (maybe /p2pc5 ?) and a new top level for
    favorites shortcuts but yeah I'm still gonna have some unruly urls.

    <http://www.edgehill.net/1/?SC=go.php&DIR=California/Bay-Area/San-Francisco/edgehill-garden/Nursery/plants/2007-07-20/crop&PG=1&PIC=0>
    will soon be:
    <http://edgehill.net/California/Bay-Area/San-Francisco/edgehill-garden/Nursery/plants/07-20-07/croppg1pc0>
    and favorites can be displayed in shorcut folder like:
    http://edgehill.net/gallery/photo-update/07-20-07

    --
    Paul Furman Photography
    http://www.edgehill.net/1
    Bay Natives Nursery
    http://www.baynatives.com
    Paul Furman, Jul 27, 2007
    #9
  10. Paul Furman wrote:

    > and soon I'll have this:
    > http://www.edgehill.net/gallery/photo-update/2007-06-24?PG=1&PIC=1


    Try one of these:

    http://www.edgehill.net/gallery/photo-update/2007-06-24?1.1
    http://www.edgehill.net/gallery/photo-update/2007-06-24 1.1
    http://www.edgehill.net/gallery/photo-update/2007-06-24?1,1
    http://www.edgehill.net/gallery/photo-update/2007-06-24 1,1

    > Also, is there any reason not to chop off the www:
    > http://edgehill.net/gallery/photo-update/2007-06-24


    Drop it. "www." is evil.

    > Oh, and I could change 2007-06-24 to 6-24-07


    Don't do that. YMD is good: it's unambiguous. MDY is a weird-ass, ambiguous
    date format, used by a tiny proportion of the world's population.

    Is "/photo-update" really needed?

    --
    Toby A Inkster BSc (Hons) ARCS
    [Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
    [OS: Linux 2.6.12-12mdksmp, up 36 days, 15:22.]

    Cryptography Challenge
    http://tobyinkster.co.uk/blog/2007/07/24/crypto-challenge/
    Toby A Inkster, Jul 27, 2007
    #10
  11. Paul Furman

    bizshop Guest

    On Jul 27, 4:47 am, Toby A Inkster <>
    wrote:
    > Paul Furman wrote:
    > > and soon I'll have this:
    > >http://www.edgehill.net/gallery/photo-update/2007-06-24?PG=1&PIC=1

    >
    > Try one of these:
    >
    > http://www.edgehill.net/gallery/pho...ehill.net/gallery/photo-update/2007-06-24 1,1
    >
    > > Also, is there any reason not to chop off the www:
    > >http://edgehill.net/gallery/photo-update/2007-06-24

    >
    > Drop it. "www." is evil.
    >
    > > Oh, and I could change 2007-06-24 to 6-24-07

    I collapse all my dates to 20070727 - eliminating the dashes and it is
    ISO standard even!

    >
    > Don't do that. YMD is good: it's unambiguous. MDY is a weird-ass, ambiguous
    > date format, used by a tiny proportion of the world's population.
    >
    > Is "/photo-update" really needed?
    >
    > --
    > Toby A Inkster BSc (Hons) ARCS
    > [Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
    > [OS: Linux 2.6.12-12mdksmp, up 36 days, 15:22.]
    >
    > Cryptography Challenge
    > http://tobyinkster.co.uk/blog/2007/07/24/crypto-challenge/
    bizshop, Jul 27, 2007
    #11
  12. Paul Furman

    Paul Furman Guest

    Toby A Inkster wrote:

    > Paul Furman wrote:
    >
    >>Also, is there any reason not to chop off the www:
    >>http://edgehill.net/gallery/photo-update/2007-06-24

    >
    > Drop it. "www." is evil.


    Thanks for confirmation. It looks good on a business card or in print
    but otherwise seems entirely pointless. I don't even know why it exists
    frankly.

    >>Oh, and I could change 2007-06-24 to 6-24-07

    >
    > Don't do that. YMD is good: it's unambiguous. MDY is a weird-ass, ambiguous
    > date format, used by a tiny proportion of the world's population.


    I know but it's like metric. I use the international standard for file
    management but it's still awkward for me to read & I'm personally more
    comfortable with the new weird formatting.

    > Is "/photo-update" really needed?


    Yes, that's a new blog type feature which is not necessarily my best
    work, just whatever I did this week. I've been sending emails with that
    title for some time now and it seems sensible to have an archive on the web.

    --
    Paul Furman Photography
    http://www.edgehill.net/1
    Bay Natives Nursery
    http://www.baynatives.com
    Paul Furman, Jul 27, 2007
    #12
  13. Paul Furman

    David Segall Guest

    Toby A Inkster <> wrote:

    >Drop it. "www." is evil.

    Why?
    David Segall, Jul 27, 2007
    #13
  14. Paul Furman

    Neredbojias Guest

    Well bust mah britches and call me cheeky, on Fri, 27 Jul 2007 15:42:13 GMT
    David Segall scribed:

    > Toby A Inkster <> wrote:
    >
    >>Drop it. "www." is evil.

    > Why?


    It stands for "Wicked Witch of the West"...

    --
    Neredbojias
    Half lies are worth twice as much as whole lies.
    Neredbojias, Jul 27, 2007
    #14
  15. Paul Furman

    Paul Furman Guest

    Paul Furman wrote:
    > I've been going through doing some search engine friendliness updates
    > with rewrite rules and would like to clean up some php query strings
    > like ?PG=2&PIC=5


    OK folks, it's a done deal, I got all his rewrite stuff working (with
    help from a consultan via instant messanging):

    Major update to the web site, this time the addresses have become much
    shorter & simpler, instead of
    http://www.edgehill.net/1/?SC=go.php&DIR=0_gallery/0-Photo-Update/2007-07-19?PG=1&PIC=2
    the new links look like
    http://edgehill.net/gallery/photo-update/07-19-07/pg1pc2
    (the old links still work too)

    (let me know if you get errors, this has been a big project to re-code)

    --
    Paul Furman Photography
    http://www.edgehill.net/1
    Bay Natives Nursery
    http://www.baynatives.com
    Paul Furman, Jul 27, 2007
    #15
  16. Toby A Inkster, Jul 27, 2007
    #16
  17. Paul Furman

    dorayme Guest

    In article <5n.co.uk>,
    Toby A Inkster <> wrote:

    > Neredbojias wrote:
    >
    > > It stands for "Wicked Witch of the West"...

    >
    > ROFL. Well, not R, but OFL anyway.
    >
    > For other reasons: http://no-www.org


    In that, it it suggested to put in some text in a .htaccess to
    make it happen without www. Presumably where it does happen
    naturally, there is a server configuration inaccessible to users.
    For example, quite a few websites that I have access to the
    server files (up to a point) do not need www but there is nothing
    to suggest anything about it in the .htaccess that is accessible
    to me (if indeed, there is even such a file).

    --
    dorayme
    dorayme, Jul 28, 2007
    #17
  18. Paul Furman

    Neredbojias Guest

    Well bust mah britches and call me cheeky, on Fri, 27 Jul 2007 21:49:48 GMT
    Toby A Inkster scribed:

    > Neredbojias wrote:
    >
    >> It stands for "Wicked Witch of the West"...

    >
    > ROFL. Well, not R, but OFL anyway.
    >
    > For other reasons: http://no-www.org


    Well, okay. I don't think it's a biggy, but... The few servers I've
    actually tried seem to take the www-less version of the domain equally a
    well as the original. It is true that it _shouldn't_ be necessary - for
    convenience, if nothing else.

    --
    Neredbojias
    Half lies are worth twice as much as whole lies.
    Neredbojias, Jul 28, 2007
    #18
  19. Paul Furman

    rf Guest

    "Toby A Inkster" <> wrote in message
    news:5n.co.uk...
    > Paul Furman wrote:


    > Don't do that. YMD is good: it's unambiguous. MDY is a weird-ass,
    > ambiguous
    > date format, used by a tiny proportion of the world's population.


    I once did the demographics on this, starting with the Windows region
    settings through to some site that lists the population of each country.

    The biggest of course is the U S of A with ~4.5% of the planets population.

    The other 10 or so countries that use MDY add up to a further 1% or so.

    So, the tiny proportion is around 5.5%. And they think they own the internet
    :)

    --
    Richard.
    rf, Jul 28, 2007
    #19
  20. Paul Furman

    Paul Furman Guest

    dorayme wrote:
    > Toby A Inkster wrote:
    >>Neredbojias wrote:
    >>
    >>>It stands for "Wicked Witch of the West"...

    >>
    >>ROFL. Well, not R, but OFL anyway.
    >>
    >>For other reasons: http://no-www.org

    >
    > In that, it it suggested to put in some text in a .htaccess to
    > make it happen without www. Presumably where it does happen
    > naturally, there is a server configuration inaccessible to users.
    > For example, quite a few websites that I have access to the
    > server files (up to a point) do not need www but there is nothing
    > to suggest anything about it in the .htaccess that is accessible
    > to me (if indeed, there is even such a file).


    All kinds of weird solutions for this.
    Here's what I ended up with:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www.edgehill\.net$ [NC]
    RewriteRule ^(.*)$ http://edgehill.net/$1 [NC,R=301,L]


    --
    Paul Furman Photography
    http://edgehill.net
    Bay Natives Nursery
    http://www.baynatives.com
    Paul Furman, Jul 28, 2007
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dede
    Replies:
    0
    Views:
    393
  2. Michele Simionato

    in search of a nicer super ...

    Michele Simionato, May 18, 2004, in forum: Python
    Replies:
    0
    Views:
    269
    Michele Simionato
    May 18, 2004
  3. Markus Rosenstihl

    Nicer way of strip and replace?

    Markus Rosenstihl, Oct 11, 2005, in forum: Python
    Replies:
    6
    Views:
    363
    Markus Rosenstihl
    Oct 12, 2005
  4. Stefan Arentz

    Is there a nicer way to do this?

    Stefan Arentz, Oct 4, 2007, in forum: Python
    Replies:
    12
    Views:
    444
    Victor B. Gonzalez
    Oct 5, 2007
  5. News123
    Replies:
    3
    Views:
    3,375
    Paul McGuire
    Jul 14, 2010
Loading...

Share This Page