Virtual path

Events happening in the community are now at Drupal community events on www.drupal.org.

Comments

Are you familiar with pathauto?

Posted by robertdouglass on May 31, 2006 at 8:17pm

It can automatically rewrite node/user/taxonomy paths in really flexible ways. Are you suggesting something different than what pathauto already does? Please clarify.

Sure Robert, I know it

Posted by narres on June 1, 2006 at 5:34am

but what it does is inserting real aliases into the database. So it slows down my sites with a huge amount of nodes.

I thought about doing this without the use of the alias-table (so I called it virtual).
The special version, which is solved in a template works fine for me. Writing a common module makes only sence, if there is a common interest.

4.6? or 4.7?

Posted by robertdouglass on June 1, 2006 at 5:46am

Aliases are much more efficient in 4.7, so if you were having problems with 4.6 pathauto, it was a bug in Drupal itself.

pathauto performance

Posted by narres on June 1, 2006 at 6:01am

I did it in 4.6.x: performance is really much better now in 4.7.x

So you rewrite incoming and outgoing URLs?

Posted by robertdouglass on June 1, 2006 at 5:48am

How does your templating system work? How do you map incoming aliased URLs to node/x?

In my template I'm only

Posted by narres on June 1, 2006 at 6:03am

In my template I'm only using a very simple mechanism:
I only use /node/$nid/$title instead of /node/$nid
this works by default.

Aaaahh.

Posted by robertdouglass on June 1, 2006 at 6:14am

Now I'm catching on =)

I would only worry that you could introduce paths that squash existing real paths. For example, if the pattern is node/$nid/$title, you'd run into troubles as soon as $title = 'edit'. It isn't really possible to predict which paths you could add onto node/$nid because any module can introduce new ones as the default means of extension. For example, the book module introduces node/$nid/outline. So you'd possibly run into weird behavior when you go to turn on a cool new module and all of a sudden the whole application breaks because of a path conflict.

You are right

Posted by narres on June 1, 2006 at 6:22am

my "solution" is not really a solution ;)

To avoid some of these unfortunatly circumstances, I'm using this way of url-representation only if you are not logged in (that is something a spider usually doesn't do).

It's an interesting idea.

Posted by robertdouglass on June 1, 2006 at 6:44am

I wonder if it is really necessary with the option of pathauto... although it is clear that your solution is very light-weight in comparison. No extra db lookups.

That's what I want to figure out

Posted by narres on June 1, 2006 at 7:22am

I introduced this solution nearly 2 years ago on a site which had over 10K nodes. At this time I had no other possibility due to performance restrictions.

The furtune is in most cases the light-weightness.

But there is another reason preventing me from using pathauto. If I decide to use another strategy of "speaking urls" I cannot use the "Bulk generate"-pathauto without destroing my manual set path-aliases.

Maybe I'm wrong but I think this will easy to implement in pathauto to use only symbolic (without use of DB) url rewriting like the i18n function i18n_init() does.

path overhaul for performance

Posted by greggles on June 1, 2006 at 1:17pm

There was some discussion a while back about introducing an alias field to the node table that is the "primary alias" for each node and then using the url_alias table for "secondary aliases". This system has the potential to improve performance in several scenarios and probably hurt it in others. I lost track of the discussion as it headed into the UI differences between a primary alias and a secondary alias - I'm not sure where it is now, probably needs some more coding and a benchmark to show whether there is any merit in the concept.

--
Growing Venture Solutions
Drupal Implementation and Support in Denver, CO

Ommiting nonsensitive words in path

Posted by narres on June 1, 2006 at 5:42am

Another aproach I thought about was to ommit some words (stopwords).

Explained by example:
Title: Location and gMap modules are working now
URL: /Location_gMap_modules_working.4711.node

The much more defined the spider relevant information is - the much better ;)

Beta snippet

Posted by narres on July 10, 2006 at 12:11pm

Search Engine Optimization (SEO)

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /