Welcome Guest, Not a member yet? Register   Sign In
Problem with .htaccess on ubuntu
#1

[eluser]Unknown[/eluser]
Hello everyone, good evening. I'm having some problems with the .htaccess on ubuntu. At work I use an Apple (MacMini) and everything's fine. But at home I got a desktop with ubuntu and I get 500 Internal Server Error.
Just FYI I'm using a Virtual Host so I can call my project a name, but that's fine, that works.
I already checked the htaccess itself, the mod_rewrite, the sites-avaiable, sites-enabled. I don't know what else can I do.
If anyone is kind enough to help me I will be greatfull.

My mod_rewrite is already enabled

Here's my .htaccess:
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /var/www/

    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

Sites-avaible default:
This I already try one, two and three <Directory> override all and none combinations

Code:
<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride All
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

/etc/hosts:
Code:
127.0.0.1       localhost
127.0.0.1       general
127.0.0.1       clean
127.0.0.1       creator

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Terminal: /var/log/apache2/error.log
Code:
[Mon Oct 14 17:39:34 2013] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Mon Oct 14 17:39:35 2013] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Mon Oct 14 17:39:37 2013] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Mon Oct 14 17:39:37 2013] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Mon Oct 14 17:41:06 2013] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://creator/
[Mon Oct 14 17:41:06 2013] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

I'm using Codeigniter HMVC, my project's name is creator, and I need to route my project without the index.php.

E.g:
creator/ = It goes to my homepage
creator/news = It goes to the news section. //Originally the route would be creator/index.php/news, and I need to get rid of the index.php

So Thank you to anyone's help!
#2

[eluser]Storyteller[/eluser]
Comparing it with mine htaccess I think your
Code:
RewriteBase /var/www/
might be incorrect. /var/www/ is localhost, so you don't account for that in the htaccess file. Sites-avaible default takes care of that by default.

Try just this:
Code:
RewriteBase /




Theme © iAndrew 2016 - Forum software by © MyBB