Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Domain Subdirectory problem

Options
  • 13-05-2006 8:47pm
    #1
    Closed Accounts Posts: 17


    Hi,
    I'm having trouble with a domain name of mine. When I try to access a subdirectory the domain extension is merged with the subdirectory domain, so if I try to access www.example.net/blog the address www.example.netblog is accessed.

    I've checked the Apache config file and all is okay (Its identical to other domains I have).

    Does anyone have any ideas/suggestions?

    Thanks.


Comments

  • Registered Users Posts: 7,739 ✭✭✭mneylon


    Sounds like a typo somewhere


  • Registered Users Posts: 3,886 ✭✭✭cgarvey


    Show us the config.

    Does the blog have it's own config? Some blogs use rewrite (Apache's mod_rewrite) rules which could be broken if you haven't specified the root URL, or something along those lines.

    .cg


  • Closed Accounts Posts: 17 judoka


    Its not just to do with the blog, its does the same thing with all the subdirectories in the domain, so www.example.net/new is interpreted as www.example.netnew, however if I type in www.example.net/sample.php it works fine.

    Has anyone had the same sort of problem? Its been like this for the past week and even the admin of the server I'm hosted on is stumped...


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    As cg said, show us the config. Also check the DOCUMENT_ROOT of that VirtualHost for a .htaccess file; looks like a RewriteRule screwup to me. FTP might not show it up, or a cp file manager, or ls at the shell, so don't just assume it's not there. If you have a shell, login and do `ls -la`.


  • Registered Users Posts: 3,886 ✭✭✭cgarvey


    Ken Shabby wrote:
    looks like a RewriteRule screwup to me.

    Indeed


  • Advertisement
  • Closed Accounts Posts: 17 judoka


    This is the config

    <VirtualHost xxx.xxx.xxx.xxx>
    ServerName example.eu
    ServerAlias www.example.eu
    ServerAlias example.net
    ServerAlias www.example.net
    DocumentRoot /home/users/me/public_html/
    CustomLog /var/log/apache/vhost.log combined
    CustomLog /home/users/me/http_logs/example.eu/access.log combined
    ErrorLog /home/users/me/http_logs/example.eu/error.log
    </VirtualHost>

    Could it be the fact that theres a .eu and a .net address set up for the same folder?


  • Registered Users Posts: 7,739 ✭✭✭mneylon


    judoka wrote:
    Could it be the fact that theres a .eu and a .net address set up for the same folder?
    No. That's completely irrelevant, though I don't see why you've put the ServerAlias entries on separate lines... not that that would make much difference


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    Neatness blacknight. :)

    It's not your VirtualHost judoka, so either there's a .htaccess in the DocumentRoot, or something else changed in the server conf.


  • Registered Users Posts: 3,886 ✭✭✭cgarvey


    Ken Shabby wrote:
    Neatness blacknight. :)

    It's not your VirtualHost judoka, so either there's a .htaccess in the DocumentRoot, or something else changed in the server conf.
    Indeed :)


  • Closed Accounts Posts: 2,046 ✭✭✭democrates


    Do the aliases need backslashes at the end?


  • Advertisement
  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    [EDIT: Arse, I thought there were Aliases in the VirtualHost config, sorry. No, you don't need slashes on ServerAliases.]


    Yes and no. If you want the address without a forward slash to be picked up, you need to exclude it from the Alias, i.e:

    Alias /home/ /path/to/home # REQUEST FOR /home WILL BE IGNORED
    Alias /home /path/to/home # REQUEST FOR /home WILL BE PICKED UP

    It should make no difference on the target, although if you go for the latter example above, Apache will append a forward slash automatically.

    The Apache guys favour the former example, if the example configuration files are anything to go on, presumably because a file called 'home' could exist in that directory, in which case it should be delivered.

    I favour the latter unless there's a specific reason not to. I also prefer to match the slashes, i.e. if there's a slash on the alias, I'll put a slash on the target, and vice versa.

    adam


Advertisement