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

[eluser]xxIdroxx[/eluser]
hello community!
Today I tried to put my site made ​​with CodeIgniter in Ubuntu but when I go to localhost / mysite / I see a blank page.
My files. Htaccess
I have enabled mod_rewrite
Code:
DirectoryIndex index.php
AddDefaultCharset utf-8
RewriteEngine on
RewriteCond $1 !^(index\.php|css|js|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]
#2

[eluser]vbsaltydog[/eluser]
[quote author="xxIdroxx" date="1328462582"]
Code:
DirectoryIndex index.php
AddDefaultCharset utf-8
RewriteEngine on
RewriteCond $1 !^(index\.php|css|js|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ index.php?/$1 [L] // Add the ? and/or remove the preceding slash
[/quote]
#3

[eluser]xxIdroxx[/eluser]
wrong. I always see the blank page
#4

[eluser]vbsaltydog[/eluser]
wrong? .... good luck.
#5

[eluser]xxIdroxx[/eluser]
yes in my host online it work but in local not
#6

[eluser]xxIdroxx[/eluser]
Help me please
#7

[eluser]CroNiX[/eluser]
Sounds like you need to check your httpd.conf file on the server and make sure your local httpd.conf uses the same options! This is a webserver configuration issue that really has nothing to do with codeigniter.
#8

[eluser]vitoco[/eluser]
this works on my xubuntu
Code:
Options +FollowSymLinks
RewriteEngine On

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

Also check the config file for apache , in my case :

/etc/apache2/sites-enabled/000-default

this works for me
Code:
DocumentRoot /path/to/www/
        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>
        <Directory /path/to/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

Finally ( or maybe before all ) check that mod_rewrite is enabled

Code:
sudo a2enmod rewrite

this page have all the steps ( spanish )

Code:
http://imbuzu.wordpress.com/2011/05/31/activando-mod_rewrite-en-apache-ubuntu-11-4/

Saludos



#9

[eluser]xxIdroxx[/eluser]
not work.
This is my 000-default
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 None
  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

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options All
        AllowOverride All
        Order deny,allow
        Deny from all
        Allow from all
    </Directory>

</VirtualHost>




Theme © iAndrew 2016 - Forum software by © MyBB