nicer url thoughts?

P

Paul Furman

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,
 
P

Paul Furman

Paul said:
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
 
P

Paul Furman

Paul said:
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.
 
J

J.O. Aho

Paul said:
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.
 
P

Paul Furman

J.O. Aho said:
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.
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.
 
J

J.O. Aho

Paul said:
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 ?

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.
 
P

Paul Furman

J.O. Aho said:
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.
 
Y

Yorkshire Pete

On 26 Jul 2007 Paul Furman wrote in alt.html
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.
 
P

Paul Furman

Yorkshire said:
On 26 Jul 2007 Paul Furman wrote in alt.html


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.ph...den/Nursery/plants/2007-07-20/crop&PG=1&PIC=0>
will soon be:
<http://edgehill.net/California/Bay-...ill-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
 
T

Toby A Inkster

Paul said:

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/
 
B

bizshop

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/
 
P

Paul Furman

Toby said:
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.
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.
 
P

Paul Furman

Paul said:
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)
 
D

dorayme

Toby A Inkster said:
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).
 
N

Neredbojias

Well bust mah britches and call me cheeky, on Fri, 27 Jul 2007 21:49:48 GMT
Toby A Inkster scribed:
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.
 
R

rf

Toby A Inkster said:
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
:)
 
P

Paul Furman

dorayme said:
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]
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top