I my site is on shared host, so I can't edit httpd.conf.
Is there any other wayt to do this?
--
Sharique

Comments

schuyler1d’s picture

if FileConfig is enabled, you can do the same with a lot of Rewrite rules
(if you can get clean URLs working, then in theory, you could get this working)

sharique’s picture

I'll try then get back to u.
Thanks
--
Sharique

schuyler1d’s picture

I came up with some Rewrite rules that seem to be working within a .htaccess.
Try this after symlinking the drupal directory ./site -> . (copying the drupal dir into ./site should also work)

#file access
RewriteRule ^\w+/(modules|misc|files|themes|sites)(.*)$ ./$1$2 [L]

#special php scripts
RewriteRule ^\w+/(update.php|install.php|index.php)(.*)$ ./$1$2 [L,QSA]

#site sub-section
RewriteCond %{REQUEST_FILENAME} ^/ABSOLUTE/PATH/TO/drupal/site/.*
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^\w+(/)?(.*)$ index.php?q=$2 [L,QSA]

#normal stuff
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Let me know if this works for you.

rtdean93’s picture

Please help me understand the symlink process.

i have created a symlink to my root directory for drupal. I have moved the symlink to the sites directory. What should I name the symlink?

Suppose my site URL is

www.mymainsite.com

and my multisite is...

www.mymainsite.com/sites/newsite

Given that - what should I name my symlink and where should I put it?

Also - the above rewrite rules - should they completely replace the default .htaccess file or be appended to the end of the default file?

Thanks for you help.

schuyler1d’s picture

Well, the easiest thing is not to use '/sites/' because that's already a special directory for Drupal. Make it '/site/' and the symlink 'site'.

If you're set upon '/sites/' I'm not even sure if it's practical without Alias. The issue is that if you have modules that serve any content (javascript/css/image files) which is pretty common, then those files will be served from /sites/..../blah.css. If you're not really interested in separating core modules from sites modules, I suppose you could try moving all your modules and themes into the drupal root section ./modules and ./themes. If you ever get something working with a '/sites/' URL please post how you do it. My guess is it's a lot more work than it's worth.

schuyler1d’s picture

Status: Active » Closed (fixed)
wretched sinner - saved by grace’s picture

Version: 5.x-0.9-5 » 6.x-1.0-alpha1
Status: Closed (fixed) » Active

I have tried this .htaccess file, but it breaks the clean urls on my existing site, so I can't setup a sub site to try this either...

schuyler1d’s picture

Version: 6.x-1.0-alpha1 » 5.x-0.9-5
Status: Active » Closed (duplicate)

wretched sinner...: It's probably better if you don't hijack other tickets. The other users on this ticket probably do not want email about your issue. Since this ticket, there are better .htaccess rules in the INSTALL file. have you tried those? Did you make the symlink? Did you set the /ABSOLUTE/PATH correctly? What did you set it to? If you're unable to fix this, please open a NEW ticket.