cancel
Showing results for 
Search instead for 
Did you mean: 

Drupal includes "~username" in URLs

pkfraser
Newbie
Posts: 5
Registered: ‎05-08-2007

Drupal includes "~username" in URLs

We have had a new website designed in Drupal which the designer has just uploaded to the cgi server, but when we view the source code for the Home page all links to files (other than graphics files) have had "~username" inserted before the required folder name.
All the pages linked from the main navigation tabs on the Home page (and subsequent pages) have the same "~..." text inserted after the home page URL and in front of the relevant directory name.  In the same way, the URL of the pages when they are returned to the browser by Drupal include the "~..." text.
[By the way, we see no graphics on the Home page = related or not...?]
How can we stop Drupal including the "~username" in the URLs?
Many thanks.
3 REPLIES 3
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Drupal includes "~username" in URLs

The presence of /~username arises from use of suEXEC to run scripts. Does Drupal derive link names by using the $_SERVER['PHP_SELF'] or $_SERVER['SCRIPT_NAME'] PHP variables? On new ccgi those variables have /~username added to the file path.
A new variable $_SERVER['SCRIPT_URL'] is available which does not contain /~username.
The absence of graphics could be directory and file access permission (chmod) related. The graphics directory probably needs to be chmod 0750 and the images chmod 0640. Uploaded images inherit their permissions from the directory so once the directory permission is fixed new files should automatically have correct permissions set.
David
Gabe
Grafter
Posts: 767
Registered: ‎29-10-2008

Re: Drupal includes "~username" in URLs

Just for future reference, the 0750 requirement relates to content directories of Wordpress, not Drupal. Drupal will work with the files directory and lower set to 0710, but you may need to disable the .htaccess in the files directory. I would mention bootstrap.inc and settings.php, but it looks like you've sorted that out already.
Gabe
pkfraser
Newbie
Posts: 5
Registered: ‎05-08-2007

Re: Drupal includes "~username" in URLs

Many thanks to both.  Yes, we have now got things sorted and working.
Much obliged!