Codeigniter | OVH | htaccess / url rewriting | Site very slow

后端 未结 3 1526
旧时难觅i
旧时难觅i 2021-01-28 15:48

Here is my htaccess for removing the index.php with codeigniter :

RewriteEngine On
RewriteCond $1 !^(index\\.php|assets|robots\\.txt)
RewriteRule ^(.*)$ index.ph         


        
相关标签:
3条回答
  • 2021-01-28 16:20

    Try this code from the OVH Forum:

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
    
    0 讨论(0)
  • 2021-01-28 16:28

    try this out:

                RewriteEngine On
                RewriteBase /
                RewriteCond %{REQUEST_FILENAME} -s [OR]
                RewriteCond %{REQUEST_FILENAME} -l [OR]
                RewriteCond %{REQUEST_FILENAME} -d
                RewriteRule ^.*$ - [NC,L]
                RewriteRule ^.*$ index.php [NC,L]
    
    0 讨论(0)
  • 2021-01-28 16:45
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L] 
    

    write this in your htaccess check this link to enable mod_rewrite function of apache setting

    0 讨论(0)
提交回复
热议问题