It made my head. Hope you guys can help. I can not understand where the error is.
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'] = "";
Www / .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 . So http://mysite.lo/index.php/welcome .
But http://mysite.lo/welcome not working.
http://localhost/mysite/www/welcome works as expected.
edit: I want to move the system and application from the root of the network. Therefore, my file structure looks like this:
application/ system/ www/ '- index.php
In index.php, of course, I changed the path to the system and application folder.
source share