2017-05-07 37 views
0

我知道這裏已經有很多這些了,但沒有一個給出的答案似乎有所幫助。Codeigniter 404頁面在現場服務器上顯示

所以我的場景是我已經在我的本地服務器(XAMPP)上構建了一個使用codeigniter的站點,並且在上傳到我的實時服務器(Hospresto)並配置它之後,我可以讓我的主頁顯示,返回一個404.

這個網站是在一個開發文件夾,我建立了另一個codeigniter網站(工作正常)。所以我無法工作的網站看起來像www.website1.co.uk/dev/website2/inner-page

控制器capitilisation沒有什麼區別,我改變了$ config ['uri_protocol'] = '汽車';到=「REQUEST_URI」

我似乎並沒有能夠從我的託管方訪問任何的httpd conf文件(不,我可以看到)和我的.htaccess是

# <IfModule mod_rewrite.c> 

RewriteEngine On 
RewriteBase/

RewriteRule ^admin(/?)$ /hnm/index.php/admin [L] 

### Rewrite Images ### 
RewriteRule ^images/gallery/large/(.*)$ /hnm/image.php?image=/img/_gallery/$1&width=1000 
RewriteRule ^images/gallery/admin/(.*)$ /hnm/image.php?image=/img/_gallery/$1&width=149&cropratio=1:1 
RewriteRule ^images/gallery/(.*)$ /hnm/image.php?image=/img/_gallery/$1&width=420&cropratio=3:2 
RewriteRule ^images/banners/(.*)$ /hnm/image.php?image=/img/_gallery/$1&width=1200 
RewriteRule ^images/blog/thumb/(.*)$ /hnm/image.php?image=/img/_blog/$1&width=320&cropratio=1:1 [L] 
RewriteRule ^images/blog/(.*)$ /hnm/image.php?image=/img/_blog/$1&width=320&cropratio=1:1 [L] 

RewriteRule ^images/avatars/(.*)$ /hnm/image.php?image=/img/_users/$1&width=100&cropratio=1:1 [L] 
RewriteRule ^images/clients/(.*)$ /hnm/image.php?image=/img/_clients/$1&width=200&cropratio=1:1 [L] 


### Canonicalize codeigniter URLs 

# If your default controller is something other than 
# "welcome" you should probably change this 
RewriteRule ^(welcome(/index)?|index(\.php)?)/?$/[L,R=301] 
RewriteRule ^(.*)/index/?$ $1 [L,R=301] 

# Removes trailing slashes (prevents SEO duplicate content issues) 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.+)/$ $1 [L,R=301] 


# Enforce NO www 

#的RewriteCond%{ HTTP_HOST}^WWW [NC] #RewriteRule ^(。*)$ http://domain.tld/ $ 1 [L,R = 301]

### 

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



# 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 ^(.*)$ /hnm/index.php/$1 [L] 

所以我現在完全茫然 - 如果任何人都可以在這方面幫助我會非常感激。

感謝

回答

相關問題