Welcome Guest, Not a member yet? Register   Sign In
The all famous mod_rewrite issue
#1

[eluser]selman555[/eluser]
All famous because so many people are having problems figuring it out! Big Grin

Hi by the way.

Could someone please explain to me what I need to do in the following situation:
I developed my website in CI on localhost via xampp. When the site was finished, I copied the site to my webdomain and got it right up to the point that mod_rewrite worked online.
I lost my offline project, so now I recopied the website from my domain to my xampp (which was also reinstalled -> new pc). I already added the .htaccess file:
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    #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]

php_flag short_open_tag off
php_flag magic_quotes_gpc Off
</IfModule>

<IfModule !mod_rewrite.c>
    # 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
</IfModule>
Both rewriteBase / and http://localhost/Tong-Il/ didn't work.

I also uncommented LoadModule rewrite_module modules/mod_rewrite.so in httpd.conf and replaced all AllowOverride None to All.

Also:
Code:
$config['base_url'] = '';
$config['index_page] = '';
have been set in application/config/config.php.

When I load the page in xampp via localhost/Tong-Il/, I get the homepage, but when clicking any link, it says 500 internal server error:
Code:
Server error!

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

If you think this is a server error, please contact the webmaster.
Error 500
localhost
Apache/2.4.2 (Win32) OpenSSL/1.0.1c PHP/5.4.4

The site can be found online at www.tong-il-neeroeteren.be
Help!?


Messages In This Thread
The all famous mod_rewrite issue - by El Forum - 07-17-2012, 11:03 AM
The all famous mod_rewrite issue - by El Forum - 07-17-2012, 11:30 AM
The all famous mod_rewrite issue - by El Forum - 07-17-2012, 11:37 AM
The all famous mod_rewrite issue - by El Forum - 07-17-2012, 11:40 AM
The all famous mod_rewrite issue - by El Forum - 07-17-2012, 11:45 AM
The all famous mod_rewrite issue - by El Forum - 07-17-2012, 01:43 PM
The all famous mod_rewrite issue - by El Forum - 07-17-2012, 02:18 PM
The all famous mod_rewrite issue - by El Forum - 07-17-2012, 02:24 PM
The all famous mod_rewrite issue - by El Forum - 07-18-2012, 10:38 AM
The all famous mod_rewrite issue - by El Forum - 07-18-2012, 01:29 PM
The all famous mod_rewrite issue - by El Forum - 07-18-2012, 02:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB