Note that there are some explanatory texts on larger screens.

plurals
  1. POCodeigniter mod_rewrite gives server 500 error
    primarykey
    data
    text
    <p>I get an server 500 error with this htaccesss file in my xampp enviorment.</p> <p>My <code>$config['index_page']</code> variable is set to <code>''</code></p> <p><code>C:/xampp/htdocs/codeigniter_test/.htaccess</code></p> <pre><code>&lt;IfModule mod_rewrite.c&gt; RewriteEngine On RewriteBase /codeigniter_test/ #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.* RewriteRule ^(.*)$ /index.php?/$1 [L] #When your application folder isn't in the system folder #This snippet prevents user access to the application folder #Submitted by: Fabdrol #Rename 'application' to your applications folder name. 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] &lt;/IfModule&gt; &lt;IfModule !mod_rewrite.c&gt; # If we don't have mod_rewrite installed, all 404's # can be sent to index.php, and everything works as normal. # Submitted by: ElliotHaughin ErrorDocument 404 /index.php &lt;/IfModule&gt; </code></pre> <p>So if I go to <code>localhost/codeigniter_test/site/home</code> now I get this server 500 error.</p> <p><code>site = controller</code> and <code>home = function in the site controller which loads up the home view</code></p> <p>Also <code>localhost/codeigniter_test/site/about</code> is not working for me. I don't get any 404 page so this means my <code>mod_rewrite</code> module is enabled. I also checked this in my <code>httpd.conf</code> file.</p> <p>Apache logs says:</p> <blockquote> <p>[core:alert] [pid 1484:tid 512] [client 127.0.0.1:3870] C:/xampp/htdocs/codeigniter_test/.htaccess: </blockquote> <p>Edit: So I just removed the entire IF part. Now localhost/codeigniter_test/ works. But if I go to localhost/codeigniter_test/site/home it doesnt work and I get an 404 page.</p> <p>Edit2: I change AllowOverride None to AllowOverride All in my httpd conf file. Now I get a 403 error when I go to: localhost/codeigniter_test/site/home/</p> <p>"The requested URL /codeigniter_test/site/home was not found on this server."</p>
    singulars
    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.
    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