'I have a codeignitor website. Which i installed on hosting as www.somedomain.com/folder but it loads base URL :: somedomain.com

I have a codeignitor website. installed in as www.somedomain.com/folder. But when i access this url it redirect to www.somedomain.com

this is my htaccess code

<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /

RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/(?:\ Ballot169)?
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\DCV)?$
RewriteRule . index.php$1 [L,QSA]
</IfModule>


Solution 1:[1]

Change your config/config.php 'base_url' line to

$config['base_url'] = 'www.somedomain.com/folder';

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ivo Ivanov