How to use a hyphen instead of an underscore when using the content type as a Views argument? (Hackable URLs) I have a classifieds site where I would like to list items at a URL structure like this:

classifieds/for-rent/apartments/title-of-my-ad.

That structure is broken down like this (views-page)/(content-type-argument)/(taxonomy-term-arg)/(node-title)

What I want to happen is this: If someone removes  then all nodes will be listed that are apartments, which were created with the 'for rent' content type; If someone remove apartments (the tax arg) then all 'for rent' items, regardless of taxonomy, are listed.

See what I am getting at?

My problem is that the content type argument has to be written with an underscore instead of a hyphen before it will work. I want to use a hyphen. It's not as ugly, plus Google specifically recommends hyphens in the url instead of an underscore, and I want to keep google happy.

so, given the above example, 

classifieds/for_rent/etc/etc &lt;= works fine.

classifieds/for-rent/etc/etc &lt;= does not work.

How do I use the hypenated form as the argument? Is there a way to do this in views? Is there a way to write something in the .htaccess file so that when an argument is received with a hyphen the url is passed with an underscore behind the scenes?

Thanks!
If you have only six types, the quickest solution may be to create 6 page displays for your view, eg, one might be:

classifieds/for-rent/%/%


and then override the filter on this display and add node type for_rent.  Then create another page view, say:

classifieds/for-sale/%/%


and filter that page display on node of type for_sale, another:

classifieds/personals/%/%


etc for personals.

ADDITION:

You could create a menu item and do this yourself, eg:

function YOURMODULE_menu() {

  $items=array();

  // any other menu items here

  $items['classifieds/%/%/%'] = array(
    'title' =&gt; 'YOUR TITLE',
    'page callback' =&gt; 'YOURMODULE_classifieds',
    'page arguments' =&gt; array(1,2,3),
    'access callback' =&gt; TRUE,
    'type' =&gt; MENU_CALLBACK,
  );

  return $items;
}

function YOURMODULE_classifieds($type, $tax, $title) {

  $type=str_replace('-', '_', $type);

  return views_embed_view(NAME_OF_YOUR_VIEW, NAME_OF_DISPLAY, $type, $tax, $title);

}


Now, this was just typed in off the top of my head so there may be subtle issues here, but the basic point is to create a menu item that responds to:

classifieds/SOMETHINGWITHADASHINIT/bar/baz


that gets the dash turned into an underscore for Drupal's internal name of the type.  So, you could "just" create a block display in your view and remove all of View's paths and call it manually like the above.  That, or ask that Views have a "transform underscores into dashes" checkbox like the "transform spaces to dashes" it has for taxonomy terms (which it might already have in D7 :)