CodeIgniter Forums
htaccess issue about Upload CI 3 on BLUEHOST - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: htaccess issue about Upload CI 3 on BLUEHOST (/showthread.php?tid=61918)



htaccess issue about Upload CI 3 on BLUEHOST - ardavan - 05-31-2015

Hi
Recently I've uploaded my CI 3 folder to my host (bluehost).

Before upload on the host I've remove index.php from my URL via .htaccess and on my localhost its working well.
Once I upload on the host, when I'm clicking on any page ill get the 500 error. checkout ( http://advin-group.net/ ).

EDIT
also my config is
PHP Code:
$config['base_url'] = '';
$config['index_page'] = ''

.htaccess
Code:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index.php|resources|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>

I've already talk to bluehost technical support, they mentioned its my coding problem. (htaccess)
how can i solve it?


RE: htaccess issue about Upload CI 3 on BLUEHOST - CroNiX - 05-31-2015

2 things I'd check.
1) make sure your rewrite module is actually named "mod_rewrite.c". Depending on the OS, it might be a different name like mod_rewite.so.
2) Try adding a ? after index.php in the rewrite rule, like index.php?/$1.


RE: htaccess issue about Upload CI 3 on BLUEHOST - ardavan - 05-31-2015

(05-31-2015, 11:17 AM)CroNiX Wrote: 2 things I'd check.
1) make sure your rewrite module is actually named "mod_rewrite.c". Depending on the OS, it might be a different name like mod_rewite.so.
2) Try adding a ? after index.php in the rewrite rule, like index.php?/$1.

Thanks for reply.

1) How to check this?? is it depend to my host OS?
2) I've added ? the error still is 404.


RE: htaccess issue about Upload CI 3 on BLUEHOST - Sky - 05-31-2015

(05-31-2015, 08:05 PM)ardavan Wrote:
(05-31-2015, 11:17 AM)CroNiX Wrote: 2 things I'd check.
1) make sure your rewrite module is actually named "mod_rewrite.c". Depending on the OS, it might be a different name like mod_rewite.so.
2) Try adding a ? after index.php in the rewrite rule, like index.php?/$1.

Thanks for reply.

1) How to check this?? is it depend to my host OS?
2) I've added ? the error still is 404.

Try to use your .htaccess rule without QSA flag


RE: htaccess issue about Upload CI 3 on BLUEHOST - ardavan - 05-31-2015

(05-31-2015, 08:26 PM)Sky Wrote:
(05-31-2015, 08:05 PM)ardavan Wrote:
(05-31-2015, 11:17 AM)CroNiX Wrote: 2 things I'd check.
1) make sure your rewrite module is actually named "mod_rewrite.c". Depending on the OS, it might be a different name like mod_rewite.so.
2) Try adding a ? after index.php in the rewrite rule, like index.php?/$1.

Thanks for reply.

1) How to check this?? is it depend to my host OS?
2) I've added ? the error still is 404.

Try to use your .htaccess rule without QSA flag

Still its the same
I've tried these 
Code:
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteRule ^(.*)$ index.php/$1 [L]



RE: htaccess issue about Upload CI 3 on BLUEHOST - ardavan - 05-31-2015

Also even when I'm delete the htaccess file ill get this error!
Code:
Not Found

The requested URL /home was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache Server at advin-group.net Port 80



RE: htaccess issue about Upload CI 3 on BLUEHOST - InsiteFX - 05-31-2015

Try changing this to another one some times it will work and some times it will not.

config.php
PHP Code:
/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string.  The default setting of 'REQUEST_URI' works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'REQUEST_URI'    Uses $_SERVER['REQUEST_URI']
| 'QUERY_STRING'   Uses $_SERVER['QUERY_STRING']
| 'PATH_INFO'      Uses $_SERVER['PATH_INFO']
|
| WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
*/
$config['uri_protocol']    = 'REQUEST_URI'

.htaccess
PHP Code:
<IfModule mod_rewrite.c>


    # Make sure directory listing is disabled
Options +FollowSymLinks -Indexes
RewriteEngine on

# NOTICE: If you get a 404 play with combinations of the following commented out lines
#AllowOverride All
#RewriteBase /wherever/ci/is
RewriteBase /

# Send request via index.php (again, not if its a real file or folder)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d

RewriteCond 
$^(robots\.txt|favicon\.ico|style\.css)

# deal with php5-cgi first
<IfModule mod_fcgid.c>
RewriteRule ^(.*)$ index.php?/$[QSA,L]
</
IfModule>

<
IfModule !mod_fcgid.c>

# for normal Apache installations
<IfModule mod_php5.c>
RewriteRule ^(.*)$ index.php/$[QSA,L]
</
IfModule>

# for Apache FCGI installations
<IfModule !mod_php5.c>
RewriteRule ^(.*)$ index.php?/$[QSA,L]
</
IfModule>

</
IfModule>

</
IfModule



RE: htaccess issue about Upload CI 3 on BLUEHOST - Avenirer - 05-31-2015

(05-31-2015, 08:05 PM)ardavan Wrote:
(05-31-2015, 11:17 AM)CroNiX Wrote: 2 things I'd check.
1) make sure your rewrite module is actually named "mod_rewrite.c". Depending on the OS, it might be a different name like mod_rewite.so.
2) Try adding a ? after index.php in the rewrite rule, like index.php?/$1.

Thanks for reply.

1) How to check this?? is it depend to my host OS?
2) I've added ? the error still is 404.

First you said there is a code 500 error, now it's a 404 error? If the error was a 500, there could also be a file rights management problem. Did you set the files to have 777 file permissions?


RE: htaccess issue about Upload CI 3 on BLUEHOST - ardavan - 06-01-2015

(05-31-2015, 11:05 PM)Avenirer Wrote:
(05-31-2015, 08:05 PM)ardavan Wrote:
(05-31-2015, 11:17 AM)CroNiX Wrote: 2 things I'd check.
1) make sure your rewrite module is actually named "mod_rewrite.c". Depending on the OS, it might be a different name like mod_rewite.so.
2) Try adding a ? after index.php in the rewrite rule, like index.php?/$1.

Thanks for reply.

1) How to check this?? is it depend to my host OS?
2) I've added ? the error still is 404.

First you said there is a code 500 error, now it's a 404 error? If the error was a 500, there could also be a file rights management problem. Did you set the files to have 777 file permissions?

All folders are 755. do i need to change to 777?


RE: htaccess issue about Upload CI 3 on BLUEHOST - InsiteFX - 06-02-2015

Did you try setting your base url?

PHP Code:
$config['base_url'] = 'http://advin-group.net/'