Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #16333
| From | James Harris <james.harris.1@gmail.com> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: Canonical URLs, truncated URLs, redirects and SEO |
| Date | 2016-01-23 16:17 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <n808tl$1go$1@dont-email.me> (permalink) |
| References | (1 earlier) <n7t5n3$era$1@news.metronet.hr> <n7td5h$7ic$1@dont-email.me> <56A252EF.1060403@arnowelzel.de> <n7vpqq$afk$1@dont-email.me> <87si1o4f32.fsf@bsb.me.uk> |
On 23/01/2016 13:09, Ben Bacarisse wrote: > James Harris <james.harris.1@gmail.com> writes: > <snip> ... >> http://my-site.com/partition/essay-1053/long-file-name >> http://my-site.com/partition/essay/1053/long-file-name >> http://my-site.com/partition/essay/long-file-name-1053 >> http://my-site.com/partition/essay/long-file-name/1053 >> >> And the short form could be one of >> >> http://my-site.com/partition/essay-1053 >> http://my-site.com/partition/essay/1053 > <snip> >> I am thinking that the only true key would be the decimal number. Even >> for the URL with the long file name I don't see a need to use anything >> other than the number to find the file. > > Which suggests the short form could be > > http://my-site.com/essay-1053 > > or even > > http://my-site.com/1053 I couldn't use those shorter forms because the number would only be unique within a folder within a partition. I'd better explain a bit more. The idea is that each partition could be under separate control, basically as if it were a separate web site. The folder which I called "essay" in the example is just the place within the partition where the partition's administrator had chosen to put a certain web page. In the fictional example, you could imagine that there would be an arbitrary number of files that the administrator decided to call essays and each essay would have a distinct number. The administrator could just as easily have decided to call them "articles" or "widgets" or whatever was appropriate, with the folder name reflecting that choice. There could be other folders within the partition, each with its own set of files and its own set of rules for URL-to-filename mapping. As an example of a different type of folder, http://my-site.com/partition/ref/scanner That would lead to /partition/ref/scanner.extn The "ref" folder in this made-up example is intended to be a place where terms are defined. (In this case the term is "scanner".) No numeric prefix is used - partly because terms are normally short already; no special shortening is needed and would, in fact, only get in the way. Because different folders would have different mapping rules the PHP script (this query does therefore just about have a tenuous relationship with the subject of the newsgroup!) which converts the URL to a filename would need to map differently depending on what folder the URL specifies. Continuing the above examples, in "essay" the files would have numeric prefixes whereas in "ref" the files would be unnumbered. That's maybe too much information but it explains why the numeric prefix has to apply within a folder, and won't be unique across the entire site. > Not that there's any harm in providing a medium length form as well > since the "partition" and "essay" bits do convey some information to the > reader. Good point. It's not all about shortening URLs. James
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Canonical URLs, truncated URLs, redirects and SEO James Harris <james.harris.1@gmail.com> - 2016-01-21 16:39 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO crankypuss <invalid@invalid.invalid> - 2016-01-21 11:22 -0700
Re: Canonical URLs, truncated URLs, redirects and SEO James Harris <james.harris.1@gmail.com> - 2016-01-22 13:58 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-21 19:16 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO James Harris <james.harris.1@gmail.com> - 2016-01-22 14:03 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO Richard Yates <richard@yatesguitar.com> - 2016-01-21 12:31 -0800
Re: Canonical URLs, truncated URLs, redirects and SEO Allodoxaphobia <knock_yourself_out@example.net> - 2016-01-21 22:42 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO Goran <goran@nospam.com> - 2016-01-22 13:01 +0100
Re: Canonical URLs, truncated URLs, redirects and SEO James Harris <james.harris.1@gmail.com> - 2016-01-22 14:11 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO Arno Welzel <usenet@arnowelzel.de> - 2016-01-22 17:03 +0100
Re: Canonical URLs, truncated URLs, redirects and SEO James Harris <james.harris.1@gmail.com> - 2016-01-23 11:59 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-23 13:09 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO James Harris <james.harris.1@gmail.com> - 2016-01-23 16:17 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO "R.Wieser" <address@not.available> - 2016-01-23 20:11 +0100
Re: Canonical URLs, truncated URLs, redirects and SEO James Harris <james.harris.1@gmail.com> - 2016-01-24 21:35 +0000
Re: Canonical URLs, truncated URLs, redirects and SEO Eli the Bearded <*@eli.users.panix.com> - 2016-01-25 22:20 +0000
csiph-web