Note that there are some explanatory texts on larger screens.

plurals
  1. POCodeigniter installation in subdirectory
    primarykey
    data
    text
    <p>I want to install the latest version of codeigniter in a subdirectory. That works so far. But now I want to remove the <code>index.php</code> from the url. So therefore I have this <code>.htaccess</code> file in the subfolder.</p> <pre><code>RewriteEngine On RewriteBase /dev/ # Removes trailing slashes (prevents SEO duplicate content issues) RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)/$ $1 [L,R=301] ### # Removes access to the system folder by users. # Additionally this will allow you to create a System.php controller, # previously this would not have been possible. # 'system' can be replaced if you have renamed your system folder. RewriteCond %{REQUEST_URI} ^system.* RewriteCond %{REQUEST_URI} ^application.* RewriteRule ^(.*)$ /index.php/$1 [L] # Checks to see if the user is attempting to access a valid file, # such as an image or css document, if this isn't true it sends the # request to index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L] </code></pre> <p>The name of the subfolder is <code>dev</code> and the webroot (the parent folder) is empty. There is just an <code>index.html</code> file in it.</p> <p>So this is resulting in this structure:</p> <pre><code>/var/www/ index.html dev/ ci installation here .htaccess </code></pre> <p>and of course <code>mod-rewrite</code> is enabled.</p> <p>Any ideas why it wont work? I get an 404 Error when calling something like <a href="http://domain.tld/dev/login" rel="nofollow">http://domain.tld/dev/login</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload