homepage Welcome to WebmasterWorld Guest from 54.167.173.250
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Google / Google News Archive
Forum Library, Charter, Moderator: open

Google News Archive Forum

    
Best delimiter using ISAPI
What google friendly delimiter should divide parameter and variable
moishier




msg:195488
 7:43 pm on Sep 2, 2004 (gmt 0)

I am working on SEO and rewriting my dynamic URLs. I have come across a problem:

I want my link that was:

domain.com/page.asp?aid=123

to be something like:

domain.com/page-aid-123.htm

The problem is that I can't use the hyphen. The programmers use the hypen sometimes in the value of a string (-1 = null) and it would mess up the rewriting. Also, if I want to dump the title of the page into the URL the best way to do that Google-wise as far as keywords in a URL are concerned is to separate them with hyphens. The underscore is also used to separate values (q=12_5_6). We also can't use slashes before the filename (domain.com/indentifier/page/aid/123.htm)because then we would not be able to use relative paths and would have to recode alot of our site. A comma also won't work since we use that to separate multiple values (&q=12,456,768)

We never use the tilde (~) in a variable so we don't have to worry about messing up values, but it looks strange having a tilde in a URL.

Any ideas? What have others done?

 

moishier




msg:195489
 3:48 pm on Sep 3, 2004 (gmt 0)

(bump...)

Airportibo




msg:195490
 4:10 pm on Sep 3, 2004 (gmt 0)

We did something like this...
with 4 parameters:
[widgets.com...]
So the parametername is actually the seperator. This of course only works if the parameter values are always numerical.
Since you don't want to mess around with the relative links you could use
[widgets.com...]

moishier




msg:195491
 1:43 am on Sep 7, 2004 (gmt 0)

It seems that we are going to go with the tilde. Does any one else use it? we are using linkfreeze, and their message boards use the tilde.

marttali




msg:195492
 7:55 am on Sep 7, 2004 (gmt 0)

I doubt that tilde is good idea, are u absolutely sure your visitors manage to reproduce it with their keyboard? Why dont you use "-" instead?

Nikke




msg:195493
 8:49 am on Sep 7, 2004 (gmt 0)

I'd say the tilde would be a mistake.

Besided what is previoulsy mentioned, it's difficult to type (for users actually typing a url), and it looks strange too.

nalin




msg:195494
 4:39 pm on Sep 7, 2004 (gmt 0)

I would go for a more complicated rewrite rule which handles '/', dependant upon which are more prominent you could use a rewrite condition to either exclude directories or acts only on known url parameters.

My pages which are rewritten for instance all take the (rather ugly) form /.*\.php\var1/val1/.../varN\/valN so I set up a rewritecond which only handles urls of this form and loop through the rule N times (very early in my rules) to extract each variable as &&varN=valN. As long as I dont name a directory "something.php" and give it two (or more) subdirectories then my rule will handle only the pages which I intend it to and will ignore all else - but this is only because I am able to rather narrowly define my rule and that which it should and should not act upon.

'~' is rather ugly, first and foremost it is used by apache to signify user homedirs via one of the modules, and second it is ugly. Provided you have a function which outputs your hyperlinks '_' or '-' could be made safe via a function call to encode url parameters (which is advisable whether or not you make use of these symbols) and similar decoding on a global include. I find for my sites I like / best because it makes extra parameters look like a deeper version of a page - which in many ways they are.

spekiehl




msg:195495
 4:57 pm on Sep 7, 2004 (gmt 0)

I use rewrites for my websites which all run on apache. I can configure apache to rewrite the urls so that, for example:

domain.com/whatever-you-want.htm -> domain.com/index.php?page=whatever-you-want&#rest-of-query#

It wouldn't be entirely much more difficult to make it do something like:

domain.com/whatever-keywords-page-aid-543.htm ->
domain.com/index.asp?aid=543&#rest-of-query#

It'd simply be something like this in the apache conf or htaccess file:

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/
RewriteRule ^/(.*?)-aid-(.*?).html /index.asp?aid=$2&%{QUERY_STRING}

pageoneresults




msg:195496
 5:15 pm on Sep 7, 2004 (gmt 0)

The problem is that I can't use the hyphen. The programmers use the hyphen sometimes in the value of a string (-1 = null) and it would mess up the rewriting.

This should not present a problem in itself. I do believe there are ways to easily work around this.

Also, if I want to dump the title of the page into the URL the best way to do that Google-wise as far as keywords in a URL are concerned is to separate them with hyphens.

Eek! I wouldn't recommend dumping any title elements into file names. That would make for a very unsightly URI and also present some usability and maintenance issues. One, two, three word file names maximum (two hyphens, no more than that if possible).

The underscore is also used to separate values (q=12_5_6).

I personally don't recommend the use of underscores in any file naming structure if it can be avoided.

We also can't use slashes before the filename (domain.com/indentifier/page/aid/123.htm)because then we would not be able to use relative paths and would have to recode alot of our site.

You may have to bite the bullet and change your coding strategies. The relative paths may possibly cause issues with your rewrite to begin with. I strongly recommend that you move to absolute URIs with all ISAPI rewrites.

I don't like the LinkFreeze product. Why? Probably because we are a ISAPI_Rewrite user for the past couple of years. Yes, they are from the same company. The LinkFreeze product is for the DIY (Do-It-Yourself) no server access user. The ISAPI_Rewrite product is much more robust and does require a global .ini file at the root of the server. Once that is done by the host, you can then drop unlimited .ini files in each root and/or virtual root of websites hosted on that server.

Best delimiter using ISAPI

Slashes and Dashes

moishier




msg:195497
 6:03 pm on Sep 7, 2004 (gmt 0)

The advantage of LinkFreeze is that I don't have to recode all of our pages that use dynamic refrences to image and form submissions to make them absolute.

So if I don't want to recode my easiest option is LinkFreeze with tildes.

But is there any other solution out there that any one is aware of that work for me?

pageoneresults




msg:195498
 6:21 pm on Sep 7, 2004 (gmt 0)

So if I don't want to recode my easiest option is LinkFreeze with tildes.

I think easiest option in this case is a bandaid fix and the long term implications are far more severe.

But is there any other solution out there that any one is aware of that work for me?

Yes. Restructure the site to be more search engine and URI rewrite friendly. The easy way out in this scenario may cause you long term grief. There are others here who will attest to that.

moishier




msg:195499
 6:26 pm on Sep 7, 2004 (gmt 0)

clarification: we don't want to use slashes since that would require a recoding to make all image and form submission references absolute paths as opposed to relative paths.

We need the functionality of LinkFreeze so we don't have to recode all link refrences in the html to the new schema (linkfeeze not only interprets a schema but also sends the new schema back to the client).

pageoneresults




msg:195500
 6:57 pm on Sep 7, 2004 (gmt 0)

Tildes should not be used in a rewrite routine.

Using Tilde in URI [google.com]

I'll reiterate Slashes and Dashes.

Working with relative URIs in an ISAPI Rewrite environment is not suggested.

tombola




msg:195501
 8:00 pm on Sep 7, 2004 (gmt 0)

I can't use the hyphen.

The underscore is also used to separate values

We also can't use slashes

A comma also won't work

If I were you, I would follow the advice of pageoneresults: "Restructure the site to be more search engine and URI rewrite friendly."

moishier




msg:195502
 7:24 pm on Sep 13, 2004 (gmt 0)

To use slashes and dashes is just to prohibitive right now. We don't have the resources to recode our complete site.

I have not yet heard a clear reason why not to use tildes. The site quoted by pageoneresults "Why tilde (~) should not be used in Web addresses (URLs)" itself uses a tilde! (/~jkorpela/tilde.html)

Can someone please be more specific as to why the tilde solution is NOT good? That it will adversely affect something? I believe that it WILL help in ranking and take away the "dynamic" perception of our site (?'s) thereby increasing deep indexing which is our problem.

fcowell




msg:195503
 6:28 am on Sep 28, 2004 (gmt 0)

A tilde in the URL should be absolutely fine! The only valid reasons he (the article) gives are because "it's hard to type", "it's hard to remember", "it looks confusing" - not to mention the article is from like 1999!

Let's face it - dynamic URLs are huge anyway and the purpose we are talking about here is not for marketing the url, but so the search engine sees something other than name-value pairs! If you are going to market a URL you would certainly a) buy a whole new url or b) create a sub-domain (something.yoursite.com) or c) create a sub-directory (yoursite.com/something) and then track for marketing purposes.

According to the W3.org site, a '~' is one of the 'unreserved' characters just like most of the characters you would use in a URL, including '-' and '_'. Here is a snippet from their site: (if you notice, they classify a '~' right alongside '-' and '_'.)

-Frank

<BEGIN>
2.3. Unreserved Characters

Data characters that are allowed in a URI but do not have a reserved
purpose are called unreserved. These include upper and lower case
letters, decimal digits, and a limited set of punctuation marks and
symbols.

unreserved = alphanum ¦ mark

mark = "-" ¦ "_" ¦ "." ¦ "!" ¦ "~" ¦ "*" ¦ "'" ¦ "(" ¦ ")"

Unreserved characters can be escaped without changing the semantics
of the URI, but this should not be done unless the URI is being used
in a context that does not allow the unescaped character to appear.
<END>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google News Archive
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved