Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

What is actually happening:

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

How do I get it to respond as expected?

share|improve this question

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .