Welcome Guest, Not a member yet? Register   Sign In
Codeigniter installation in subdirectory

I want to install the latest version of codeigniter in a subdirectory. That works so far. But now I want to remove the index.php from the url. So therefore I have this .htaccess file in the subfolder.

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]
The name of the subfolder is dev and the webroot (the parent folder) is empty. There is just an index.html file in it.

So this is resulting in this structure:

        ci installation here
and of course mod-rewrite is enabled.

Any ideas why it wont work? I get an 404 Error when calling something like

Messages In This Thread
Codeigniter installation in subdirectory - by AkinBredailik - 11-02-2022, 03:07 AM

Theme © iAndrew 2016 - Forum software by © MyBB