Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

I can't login in my application after activating htaccess

Discussion in 'General Discussion' started by abuujurayj, Apr 23, 2018.

  1. abuujurayj

    abuujurayj Member

    Joined:
    Apr 23, 2018
    Messages:
    6
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    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..
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,888
    Likes Received:
    90
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. abuujurayj

    abuujurayj Member

    Joined:
    Apr 23, 2018
    Messages:
    6
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    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!
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,518
    Likes Received:
    425
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. abuujurayj

    abuujurayj Member

    Joined:
    Apr 23, 2018
    Messages:
    6
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Tanzania, dar es salaam
    cPanel Access Level:
    Website Owner
    but remember before activation of htaccess everything was fine!!!!!

    let me look for more help elsewhere, if the problem will be solved I shall let you know. thanks
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,518
    Likes Received:
    425
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Renaming the htaccess then, should have helped. Your Hosting Provider can certainly take a closer look at the account for you for fastest resolution I would think.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. abuujurayj

    abuujurayj Member

    Joined:
    Apr 23, 2018
    Messages:
    6
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    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
     
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,518
    Likes Received:
    425
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    If you've got root access to this server you would have access to that file. Your forum profile lists you as Website Owner though and as Website Owner you normally would not have the access to that file.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. abuujurayj

    abuujurayj Member

    Joined:
    Apr 23, 2018
    Messages:
    6
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Tanzania, dar es salaam
    cPanel Access Level:
    Website Owner
    ok let me contact hosting provider
     
    Infopro likes this.
  10. abuujurayj

    abuujurayj Member

    Joined:
    Apr 23, 2018
    Messages:
    6
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    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.
     
    cPanelMichael and Infopro like this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice