2017-05-07 42 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] 

所以我现在完全茫然 - 如果任何人都可以在这方面帮助我会非常感激。

感谢

回答

相关问题