Ubuntu

2011-02-22 25 views
6

üzerinde Codeigniter ile ilgili sorunlar Ubuntu 10 (LAMP) üzerinde Codeigniter var. Ben htaccess dosyası var: Şimdiye kadarUbuntu

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase /dort 
#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 ^(.*)$ /dort/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 ^(.*)$ /dort/index.php?/$1 [L] 
</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> 

, benim taban sitesi 'dort' adlı bir klasör altında oturuyor, bir IP adresi ile uzaktan sunucu bağlantılı, bu yüzden böyle derdi:

http://some_ip/dort şimdi dort için bir sanal konak eşlenen, bu yüzden böyle diyoruz: http://demo.dort.com/ ve aniden hiçbir şey giriş sayfasına (index.php) dışında

çalışır. Ben config.php de $ yapılandırma [ 'base_url'] değiştirdik ama

tutmak alma 404.

Lütfen yardım :(

cevap

7

sanal konak kullandınız mı?

aynı olması sorun ve birlikte çözmek bu

1) Make benim durumumda sanal konak şu şekildedir:/etc/apache2/siteler-kullanılabilir/varsayılan

<VirtualHost *:80> 
    ServerAdmin [email protected] 
    DocumentRoot /var/www/dort 
    ServerName yourdomain.biz #this domain must be define tld info. 
    ErrorLog /var/log/apache2/error_2.log 
    <Directory /var/www/dort> 
     Options Indexes FollowSymLinks MultiViews 
       AllowOverride All 
       Order allow,deny 
       allow from all 
       # Uncomment this directive is you want to see apache2's 
       # default start page (in /apache2-default) when you go to/
       #RedirectMatch ^/$ /apache2-default/ 

    </Directory> 

</VirtualHost> 
dosya/etc/hosts ev sahibi

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

3) .htaccess

<IfModule mod_rewrite.c> 
    RewriteEngine On 
    RewriteBase/

    # Send admin URL's to the admin controller (then skips the rest of the redirect rules) 
    RewriteCond %{REQUEST_URI} ^/admin(.*) 
    RewriteRule ^(.*)$ /index.php/admin/$1 [L]  

    # Redirects any request thats not a file or directory through to the main controller 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule ^(.*)$ /index.php/main/$1 [L] 

</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. 

    ErrorDocument 404 /index.php 
</IfModule> 

4) yeniden başlatma apache hata

Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName 

5) Git göstermez zaman emin olun Ayar

2) Bu URL'ye gözatmak ve bu URL'yi çalıştırmak için , bu URL'yi görüntülemek ve çalıştırmak için http://yourdomain.biz

4

Çözümün üstünde benim için çalıştı. Sadece bir şeyi vurgulamak istiyorum. AllowOverride AllowOverride Yok yerine sanal konak dosyasında/etc/apache2/sites-kullanılabilir/varsayılan değer olduğundan emin olun