Welcome Guest, Not a member yet? Register   Sign In
Create CI4 project in sub folder
#3

I have the same situation here.

I create a CI4 app in localhost with WAMP and a new VirtualHost and works correctly.

But, I want to add this app in a subfolder: "C:\wamp64\www\test\app_one", where "app_one" is my project;

In "app_one" I add a .htaccess with following content for the redirect to /public


Code:
RewriteEngine On
RewriteBase /test/app_one

RewriteCond %{THE_REQUEST} /public/([^\s?]*) [NC]
RewriteRule ^ %1 [L,NE,R=302]

RewriteRule ^((?!public/).*)$ public/$1 [L,NC]



When access "http://localhost/test/app_one/"  the error is generated:


Quote:404 - File Not Found
Controller or its method is not found: App\Controllers\Test::app_one


In .htaccess of /public have this:


Code:
# If you installed CodeIgniter in a subfolder, you will need to
# change the following line to match the subfolder you need.
# http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase
# RewriteBase /



When remove # and change to RewriteBase /test/app_one  or RewriteBase /test/app_one/public  the same error is generated.


Can someone help me? Thanks!!!!!
Reply


Messages In This Thread
Create CI4 project in sub folder - by jean5769 - 04-09-2020, 09:38 AM
RE: Create CI4 project in sub folder - by dodbda - 04-09-2020, 12:53 PM
RE: Create CI4 project in sub folder - by meta - 06-04-2020, 03:56 PM
RE: Create CI4 project in sub folder - by meta - 06-05-2020, 07:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB