Welcome Guest, Not a member yet? Register   Sign In
htaccess issue about Upload CI 3 on BLUEHOST
#1
Exclamation 
(This post was last modified: 05-31-2015, 08:09 PM by ardavan.)

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?
Reply
#2

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.
Reply
#3

(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.
Reply
#4

(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
Reply
#5

(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]
Reply
#6

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

(This post was last modified: 05-31-2015, 10:43 PM by InsiteFX.)

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
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#8

(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?
Reply
#9

(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?
Reply
#10

Did you try setting your base url?

PHP Code:
$config['base_url'] = 'http://advin-group.net/'
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB