2013-04-12 100 views
0

您好,我在網址有問題..我認爲當我上傳我的文件到活網站的htaccess代碼我注意到錯誤是thi ----------- --->沒有指定輸入文件。這裏是我的網站鏈接http://springrainglobal.com/movies_world/index.php/movies 這裏是我的htaccess代碼htaccess在codeigniter在網站

RewriteEngine On 
RewriteCond %{REQUEST_URI} ^system.* 
RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|images|js|assets|css) 
RewriteRule ^(.*)$ /movies_world/index.php?/$1 [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /movies_world/index.php?/$1 [L] 

誰能幫助我如何活的服務器上配置適當的htacces?請幫助

+0

你確定問題是htaccess? (可能不是)你可以發佈控制器和視圖嗎? – stormdrain

回答

0

您的網站是提供http://springrainglobal.com/movies_world/movies下(離開index.php),如果這就是你想要的。

+0

太好了!謝謝你的幫助!它對我有很大幫助!我不認爲該index.php不應該放置!謝謝!有用! – hello

0

這是標準的.htaccess我總是使用CodeIgniter的構建:

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

如果更改代碼的第3行至

RewriteBase /movies_world/ 

你應該設置。