Incorrect URL for new user site

Events happening in the community are now at Drupal community events on www.drupal.org.
mlapl1's picture

Hello,

Yesterday I downloaded the latest version of the openscholar distribution, installed it successfully, and encountered and (temporarily) solved the issue of the myriad error messages sent out.

I have now encountered a problem which made me give up last time I attempted to instal openscholar. maybe someone can help.

openscholar is installed in a subdirectory of the web root (http://mysite.com/openscholar).

When a user creates their own website, everything seems to work ok and they create a site at http://mysite.com/openscholar/user1.

When I use that user's contact form to send him a message, the message sends me back to http://mysite.com/user1/home. It SHOULD be http://mysite.com/openscholar/user1/home.

Furthermore, the "featured" section of the front page also lists the connection to my new user as http://mysite.com/user1.

Clearly, somewhere, the system does not remember that the main site lives in http://mysite.com/openscholar.

Any clues on how to fix that? Do you think it is a problem with my server, the site setup or openscholar?

I would really appreciate some help with this - or I can give up once again. I cannot afford a huge amount of time on setting this up.

Thank you
Andrew

Comments

mlap1, if you go into

mohhess's picture

mlap1,
if you go into the settings for the individual site you have the option of setting up a custom url for the site. You may want to try putting in the www.mysite.com/openscholar url into the custom url field so that Openscholar will start recognizing that it shouldn't go to the base www directory.

Another option, if you trust yourself to look through the database, open up the mysql and search for base_url of base url. You'll find a table that contains the field that helps specify where all of the urls are built off of for all of the sites. You could then enter your url there "www.mysites.com/openscholar" and then it should always include that within the urls and you shouldn't run into problems again.

If you try doing it the database way, and cannot find the correct table, repost and I'll find the specific table where base url is found. I've had similar issues on sites that I've setup, but don't give up because with a simple tweak you can get things working correctly. Unfortunately, openscholar/drupal doesn't always like being installed in a directory inside the base folder.

one more thing

mohhess's picture

Try this first. Go to mysite/openscholar/.htaccess. Open up that file in wordpad or your favorite code editor (or if you are using cpanel, use their code editor). Scroll 3/4 of the way down and search for a section that talks about "modify the rewritebase". In that section you can uncomment out a line that says "RewriteBase /drupal". Then change drupal to openscholar or whatever your subdirectory is. Save the file and then clear all drupal caches, browser caches, and reload your pages. That may do it.

Thanks everyone

mlapl1's picture

I appreciate everybody's help.

So far, I have tried the .htaccess solution but that does not seem to have helped. In my experimentation (although it does appear that .htaccess should be modified given the path to the site), I noticed that sometimes the correct URL was displayed but I got a 404 error.

I have yet to experiment with the database approach because I have not been able to identify the table containing the base URL column. making changes in the 'purl' table does not seem to help much.

All the very best and thanks again

Andrew

OpenScholar

Group organizers

Group notifications

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