Welcome Guest, Not a member yet? Register   Sign In
404 Error while Accessing sub directory
#1

My directory structure:
base_url : /application/views/PGO
sub directories: /application/views/PGO/PRO & /application/views/PGO/PRO/Admin

public_html/.htaccess
RewriteCond %{HTTP:X-Forwarded-SSL} !on
RewriteCond %{HTTP_HOST} ^xyz\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.xyz\.com$
RewriteRule ^/?$ "https\:\/\/www.xyz\.com\/PGO" [R=301,L]


Question:
When I access https://www.xyz.com it gets redirected to https://www.xyz.com/PGO and loads default page index.php. When I try access sub-directories https://www.xyz.com/PGO/PRO or https://www.xyz.com/PGO/PRO/Admin then I see 404 error.
where am I doing wrong?
Reply
#2

Well we need to know what version of CodeIgniter you are using?

It looks like your .htaccess file is wrong, if using CI 4 then you should use the .htaccess file that comes
with it.
What did you Try? What did you Get? What did you Expect?

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

(10-04-2021, 12:41 AM)InsiteFX Wrote: Well we need to know what version of CodeIgniter you are using?

It looks like your .htaccess file is wrong, if using CI 4 then you should use the .htaccess file that comes
with it.

CI_VERSION = '3.1.10'

Whole website works perfectly if files are in the root https://www.xyz.com/PGO.
Any page, which is in sub directory of root is not accessible; encounter 404.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB