I want normal URL like www.sample.com/controller not www.sample.com/public/index.php/controller.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ public/index.php/$1 [L]
My .htaccess file
Just do
Step 1: In public/ directory, copy index.php and .htaccess to your root project directory.
Step 2: In the root project directory, open index.php and edit the following line:
index.php -> $pathsPath = FCPATH . '../app/Config/Paths.php';
to
index.php => $pathsPath = FCPATH . 'app/Config/Paths.php';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With