Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So my localhost server has never had a problem because I've never been developing with other people on multiple websites.

Now, however, accessing a secondary site via an Alias is running into a problem as the primary site's (drupal) redirect kicks in and returns a 404. It works fine using a domain from hosts.

The primary site localhost is at ~/www, the secondary site localhost/second is at ~/second

The second site's config file is as such:

# Allow lan to access the site without modifying their hosts files
Alias /second /home/j/second

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    # Allow me to access it from domain in hosts file
    ServerName second.local
    # And when I do that undo the alias
    Alias /second /home/j/second/second

    DocumentRoot /home/j/second
    <Directory /home/j/second>
        Options FollowSymLinks
        AllowOverride All
        Order deny,allow
        deny from all
        allow from 192.168.1
        allow from 127.0.0.1
    </Directory>    
</VirtualHost>

What is actually happening:

  • localhost should load
    ~/www and loads
    ~/www
  • localhost/second should load
    ~/second and loads
    ~/second
  • localhost/second/about should load
    ~/second/index.php?q=about but instead loads
    ~/www/index.php?q=second/about

How do I get it to respond as expected?

share|improve this question

1 Answer 1

You may find a .htaccess file in your drupal site root and look at the rewriterule/rewritebase directives. Your urls are rewritten

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.