PathAuto to generate /sites/{child-domain.com}/ part of file path ???

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by greta_drupal on June 23, 2011 at 3:23pm

Anyone using PathAuto automated alias settings to generate the /sites/{child-domain.com}/ part of file path, so that you can use reference nodes without hardcoding that in?

Run into any problems doing it?

Comments

The /sites/domain/ structure

Posted by mile23 on June 23, 2011 at 6:18pm

The /sites/domain/ structure is used internally by Drupal to organize different domains running from the same code. It's not part of a clean URL, or at least shouldn't be. :-)

Oops. I co-mingled two

Posted by greta_drupal on June 23, 2011 at 6:46pm

Oops. I co-mingled two different thoughts, there. I have edited my question to say "file path".

The way that I normally use PathAuto is to generate unique/logical clean URLs (e.g., www.mysite.com/events/bbq).

Someone is IRC suggested using PathAuto to get around having to use /sites/mychildsite.com/ for multisite paths (content links, block visibility, etc.). Didn't seem that PathAuto would work for that.

But, I'd sure like to know what will. I have scoured many, many posts, and haven't really found that addressed. (The D6 path patch seems to address something different.)

Again, it's unclear what

Posted by mile23 on June 23, 2011 at 7:59pm

Again, it's unclear what you're trying to 'get around.' :-)

Just want to use relative

Posted by greta_drupal on June 23, 2011 at 8:42pm

Just want to use relative paths as I would for a standalone sight, in content links, block visibility, etc. -- node/22 , about-us, themes/custom_fusion/images/mylogo.jpg, and so on. Not getting that.

My expectation was that I could set the Base URL in each child sites' settings.php file to its domain name (e.g., http://childsite1.com) so that the paths would be relative to that.

Seems that I have to prefix every 'relative' path with /sites/childsite1.com/.

You need to configure the

Posted by mile23 on June 23, 2011 at 9:10pm

You need to configure the various site domains to map to the main drupal install directory, not the subdomain directories.

The way you do this depends on what hosting or server setup you have. For instance, on pair.com, you 'manage domains' and enter a path for each domain. For a Drupal multisite setup, all of those paths would be the same: The directory that contains Drupal, and not the /sites/whateverdotcom/ directories.

HTH.

That is exactly how it is.

Posted by greta_drupal on June 23, 2011 at 9:21pm

That is exactly how it is. Subdomains were created to point to public_html, where the parent site is installed.

Sites share only codebase:

Posted by greta_drupal on June 23, 2011 at 9:26pm

Sites share only codebase: core, contrib modules, themes, libraries.

You are talking about wanting

Posted by davidhernandez on June 23, 2011 at 11:46pm

You are talking about wanting to do the same thing with files, correct? You want to reference image1,jpg as example.com/image1.jpg, or just /image.jpg, instead of example.com/sites/example.com/files/image.jpg? If my assertion is correct, you have to remember that you are dealing with files. They are not Drupal paths. Even if you are using clean URLs, the paths, like node/22, are being passed to Drupal as GET variables. (index.php?q=node/22) These are not real files. To get a different path to a real file to work, you need to set up something with your web server to handle this. For example, I use Apache aliases, which require access to the server level configuration. I alias /files with /sites/example.com/files.

Multisite

Group organizers

Group notifications

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

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