OK, I have done the obvious and implemented "clean" urls with mod_rewrite. Now I have user blog URLs that look like:

http://www.example.com/blog/4

But what I really want is something like

http://www.example.com/blog/joebaloney

or maybe even

http://joebaloney.example.com/

... in order to provide nice, clean URLs to a potentially huge community of bloggers.

We have DNS wildcarding, Apache's dynamically configured mass virtual hosting concept, and various url-rewriting modules for Drupal.

But what's the smart way to bring them all together. Advice?

Comments

tangent’s picture

Use a URL alias on any content that you want to have a permanent or specific url.

Geary’s picture

And install the sweet Pathauto module which will generate nice URLs automatically according to a format that you specify.

yelvington’s picture

To clarify, I'm not looking to pathalias specific blog postings ... which is the point of the module, isn't it? I'm looking to pathalias user blogs so they can tell other people "here's my blog URL" and it will be short and personal.

Ultimately the competition is blogspot....

grohk’s picture

I used it for awhile, but it had some bugs. I might try to use it again and file some issues on it. You should too if you are serious about it, it needs some help.

Try it out:
http://drupal.org/node/13215

---
Code Orange: Drink Your Juice

tangent’s picture

Perhaps I'm missing your point but you can create a path alias which points to a user's blog.

http://www.example.com/jazzyjeff => http://www.example.com/blog/52

The only downside is that the breadcrumb navigation doesn't always handle aliased urls well.

freyquency’s picture

I think one problem is that

http://www.example.com/myblog/

works well with URL alias, but a blog post still goes to

http://www.example.com/today_was_great

instead of

http://www.example.com/myblog/today_was_great

which would be wikked.

this post brought to you by:
`':,..,:'``':,..,:'``':,..,:'``':,..,:'`
erik mallinson

tangent’s picture

I finally get what the poster is trying to do.

The Blog module, as I understand it, was not designed to facilitate separate individual user blogs but a community blog. This doesn't mean that each users' blog cannot be read individually but that it is still a part of the comminity system. If the desired behavior is for each blogger to have their own site then Drupal 4.6 will allow multiple sites to run from the same codebase.

My understanding is that Drupal was not created to compete with blogging programs.

yelvington’s picture

I really want community blogging and I like the way Drupal supports that -- everybody has a personal blog, but the postings are aggregated in a community overview. So I wouldn't want to separate them into multiple sites.

Path aliasing works ... but it's manual entries into a table. That's fine if you have just a few users, but I'm planning for thousands.

It sounds like nobody has tried to automagically alias all usernames. It looks doable by writing a conf_url_rewrite() function (as explained in the path help) that would look up the user ID in the database for incoming requests.

If there's a better way ... ??

grohk’s picture

Mass URL does automagically alias *all* user names for blogs. Now that you mention it I am going to try using this moduel again. ;)

---
Code Orange: Drink Your Juice

freyquency’s picture

hmm. didn't ever try it. me too.

this post brought to you by:
`':,..,:'``':,..,:'``':,..,:'``':,..,:'`
erik mallinson

yelvington’s picture

MassURL isn't in the modules list, but I found it with a Web search. It's still in CVS. Here's the link. It may do what I want.

reikiman’s picture

I've installed pathauto but left the settings default. The generated default URL's were: http://mysite.com/the-title-string-in-dashes

I didn't quite want that and finally looked closely at the pathauto admin screen. Turns out you can customize the generated URL's pretty nicely. Right now I'm using http://mysite.com/blog/<>/topic/path/title-string

That ought to do nice things in the deranged minds of the search engines, if nothing else.

David Herron - http://7gen.com/

bertboerland’s picture

for user.example.com see this howto
--
groets
bertb

--
groets
bert boerland

Carlos Miranda Levy’s picture

In v4.5 you could access a user's blog by user name as well as user number as you can see in:

http://www.ciudadesvirtuales.com/blog/carlos
http://www.ciudadesvirtuales.com/blog/1

Which both show the blog entries for user 1/carlos.

This functionality apparently is gone in v4.6 as can be seen at

http://www.fellownies.org/blog/1 works just fine, but
http://www.fellownies.org/blog/CarlosMirandaLevy is not (shows the same thing as http://www.fellownies.org/blog/1

Any ideas or suggestions?

It has meant a lot to users to be able to promote their blogs with their name, http://www.ciudadesvirtuales.com/blog/carlos instead of http://www.ciudadesvirtuales.com/blog/1

yelvington’s picture

Carlos, as discussed above, you must install the mass_url module.
http://drupal.org/node/13215

It does work with 4.6; we use it at http://www.BlufftonToday.com.

Carlos Miranda Levy’s picture

Thanks, Steve.
I found a solution with pathauto (formally updated for 4.6).
http://drupal.org/node/17345

Not only does path auto does this, but it also takes care of the blank spaces turning them into _ or whatever you choose. And it does it for all types of nodes and content. It even allows you to redo things over and over.

------
Con paciencia y calma,
sube un burro a una palma