S
S
sllugovskih2019-12-23 21:42:53
Nginx
sllugovskih, 2019-12-23 21:42:53

Question on nginx and codeigniter, how to remove index.php?

The personal account on codeigniter 2 is located in the ti directory on the site, for example https://site.ru/ti/
There was a setting to remove index.php from the URL, the conditions were written in .htaccess

# BEGIN HTTPS Redirection Plugin
#<IfModule mod_rewrite.c>
#RewriteEngine On
#RewriteCond %{HTTPS} off
#RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#</IfModule>
# END HTTPS Redirection Plugin

<IfModule mod_rewrite.c>

    Options +FollowSymLinks
    RewriteEngine on

    # Send request via index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?$1 [L]

</IfModule>

Now we are moving to nginx, respectively, the .htaccess file does not work, how to rewrite it under the nginx config? Thanks in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question