This is doing my mind in. Hope everyone might help. I can not discover in which the error lies.

httpd-vhosts.conf

NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
    DocumentRoot /opt/lampp/htdocs
    ServerName localhost
</VirtualHost>

<VirtualHost 127.0.0.1>
    DocumentRoot /home/tilman/Sites/mysite/www
    ServerName mysite.lo
</VirtualHost>

/etc/hosts

127.0.0.1   localhost
127.0.0.1   mysite.lo

config.php

$config['base_url'] = "http://mysite.lo";
$config['index_page'] = "";

world wide web/.htaccess

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
    ErrorDocument 404 index.php
</IfModule>

Now http://mysite.lo shows me the default controller. http://mysite.lo/index.php too. The same is true http://mysite.lo/index.php/welcome.

But http://mysite.lo/welcome does not.

http://localhost/mysite/www/welcome works not surprisingly.


edit: I wish to move system and application from the web root. So my file structure appears like this:

application/
system/
www/
 '- index.php

In index.php I transformed the pathways to system and application folder, obviously.

Seems like you are getting rewritemod/htaccess issues instead of VirtualHost issues. Perhaps you have ensured that you have a block for example

<VirtualHost *:80>
  ServerName mysite.lo
  <Directory /home/tilman/Sites/mysite>
    AllowOverride All
  </Directory>
</VirtualHost>

somewhere in your config files? The truth that /index.php and /index.php/welcome work, let me know it's the rewrite mod that isn't functioning...

Inside your virtual host, would you not require this?

<VirtualHost 127.0.0.1>
    DocumentRoot /home/tilman/Sites/mysite
    ServerName mysite.lo
</VirtualHost>

I am unsure you possessed the www portion.