I can't login in my application after activating htaccess

abuujurayj

Member
Apr 23, 2018
6
3
3
Tanzania, dar es salaam
cPanel Access Level
Website Owner
I'm using cpanel as online server, Initially before activating htaccess file i was able to login but after activating it I can't login again to my application built in codeigniter flamework.

Also I don't know how to deactivate htaccess in cpanel and also i cant find httpd in cpanel.

MY APPLICATION IS LOCATED IN SUB DOMAIN AS : example.com/project/social. where example.com is the main domain, project is a sub domain and social is a folder containing codeigniter application.

.htaccess is also located in social folder together with codeigniter folders and it's look this


Code:
<IfModule mod_rewrite.c>
  RewriteEngine On

   RewriteBase /social/
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php?/$1 [L]

 </IfModule>

 <IfModule !mod_rewrite.c>

  ErrorDocument 404 /index.php
 </IfModule>

config.php is here

PHP:
$config['base_url'] = 'http://project/social/';
$config['index_page'] = 'index.php';
$config['uri_protocol'] = 'QUERY_STRING';

When i try to login via login page the following message at browser is displayed

Code:
From project
 Hay un error en el inicio!

Any help please, i can't access my application but before activation of htaccess i was able..
 

24x7server

Well-Known Member
Apr 17, 2013
1,894
91
78
India
cPanel Access Level
Root Administrator
Hi,

Also I don't know how to deactivate htaccess in cpanel and also i cant find httpd in cpanel.
A simple rename of the file will deactivate it.. You can go to the filemanager and and rename it to .htaccess_BK and it will deactivate the .htaccess file.

If you have only cPanel account with a hosting provider, then you cannot do changes in the http because that is controlled by the server administrator and not by any user.
 

abuujurayj

Member
Apr 23, 2018
6
3
3
Tanzania, dar es salaam
cPanel Access Level
Website Owner
Thanks for your response, but i have already rename it to something else but still i can't login.

I tried also to create another sub domain and to copy application folders in it without htaccess but still i can't login. The message displayed by the browser is like this

Code:
From project
 Hay un error en el inicio!
 

Infopro

Well-Known Member
May 20, 2003
17,113
507
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
MY APPLICATION IS LOCATED IN SUB DOMAIN AS : example.com/project/social. where example.com is the main domain, project is a sub domain and social is a folder containing codeigniter application.
If you created an actual sub.domain for your project, it would be at project.example.com/social/ I would think.

That error is not a cPanel error. Have you asked your Hosting Provider for assistance with this?
 

abuujurayj

Member
Apr 23, 2018
6
3
3
Tanzania, dar es salaam
cPanel Access Level
Website Owner
sorry can I follow these procedures in cpanel?
Code:
Go to /etc/apache2/apache2.conf file above and look for

<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

Change "AllowOverride" from None to All
 

abuujurayj

Member
Apr 23, 2018
6
3
3
Tanzania, dar es salaam
cPanel Access Level
Website Owner
The problem solved, the source of problem was a single line in codeigniter in config.php file, here it is
Code:
$config['uri_protocol']    = 'REQUEST_URI';
I was able to detect the source of problem after running my application by using localhost.

Then I was changed that line to
Code:
$config['uri_protocol']    = 'QUERY_STRING';
after that the problem disappeared. thanks a lot for your support.