【发布时间】:2016-05-30 09:57:34
【问题描述】:
这是我上传到在线服务器的第一个应用程序。我在 CodeIgniter 3.0.1 上创建了应用程序并将其上传到 000webhost.com 。但问题是,我的链接都没有被路由。我在网上查过,我的.htacess 文件似乎是正确的。我已经检查了这个问题My .htaccess file is not working,我和他有同样的问题,但是正确的答案没有用。
这是我的.htacess 文件
DirectoryIndex index.php
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|public|images|css|js|robots\.txt)
RewriteRule ^(.*)$ index.php?/$1 [L]
【问题讨论】:
-
你的错误是什么?你想达到什么目标?
-
您需要在根目录和css、js等子文件夹中创建一个名为“public”的文件夹。
-
你能提供你得到的错误吗?是 500 错误还是别的什么?
-
@safin 我定义了一条路线: $route['club'] = 'controller/method' .. 但是当我尝试使用 websitename.com/club 访问这条路线时,它给了我一个 404 .
-
显示404时的url是什么
标签: php .htaccess codeigniter routes web-hosting