Welcome Guest, Not a member yet? Register   Sign In
issue after migration windows to Linux
#1

Greetings,
Code:
After moving from windows to linux CI version 3.1 .   I'm  getting error message to many redirect after my url parse  http://mysite.com/login . below is the .htacess of my root folder . Do I need to maek any other  hanges to make it work on linux.

<IfModule mod_rewrite.c>
    RewriteEngine On
    #RewriteBase /


Options -Indexes


    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
   

RewriteRule    ^images/(.+)_(.+)_([0-9]+)_([0-9]+)\.jpg?$    timthumb.php?src=$1/$2.jpg&w=$3&h=$4&zc=1  [NC,L]
RewriteRule    ^images/(.+)_(.+)_([0-9]+)_([0-9]+)\.png?$    timthumb.php?src=$1/$2.png&w=$3&h=$4&zc=1  [NC,L]
RewriteRule    ^images/(.+)_(.+)_([0-9]+)_([0-9]+)\.jpeg?$    timthumb.php?src=$1/$2.jpeg&w=$3&h=$4&zc=1  [NC,L]

    RewriteRule    ^realimages/(.+)_(.+)_([0-9]+)_([0-9]+)\.jpg?$    timthumb.php?src=$1/$2.jpg&w=$3&h=$4&zc=2  [NC,L]
    RewriteRule    ^realimages/(.+)_(.+)_([0-9]+)_([0-9]+)\.png?$    timthumb.php?src=$1/$2.png&w=$3&h=$4&zc=2  [NC,L]
    RewriteRule    ^realimages/(.+)_(.+)_([0-9]+)_([0-9]+)\.jpeg?$    timthumb.php?src=$1/$2.jpeg&w=$3&h=$4&zc=2  [NC,L]

    #When your application folder isn't in the system folder
    #This snippet prevents user access to the application folder
    #Submitted by: Fabdrol
    #Rename 'application' to your applications folder name.
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]

   
    </IfModule>

    <IfModule !mod_rewrite.c>
        # If we don't have mod_rewrite installed, all 404's
        # can be sent to index.php, and everything works as normal.
        # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>
Reply
#2

You may need to remove the ? mark from these lines in your .htaccess file.

Code:
RewriteRule ^(.*)$ /index.php?/$1 [L]

# And this one

RewriteRule ^(.*)$ index.php?/$1 [L]


Also set your RewriteBase in the .htaccess file.

Code:
RewriteBase /
What did you Try? What did you Get? What did you Expect?

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

[quote pid="390515" dateline="1633612400"]
Current setting but still same issue
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
RewriteBase /



    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$  index.php?/$1 [L]
   
    #When your application folder isn't in the system folder
    #This snippet prevents user access to the application folder
    #Submitted by: Fabdrol
    #Rename 'application' to your applications folder name.
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$  index.php?/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]

   
    </IfModule>

    <IfModule !mod_rewrite.c>
        # If we don't have mod_rewrite installed, all 404's
        # can be sent to index.php, and everything works as normal.
        # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>

[/quote]
Reply
#4

use wsl for win10

https://docs.microsoft.com/en-us/windows/wsl/install

see it used an its wonderfullll tools for win10 developers
Enlightenment  Is  Freedom
Reply
#5

My issue is not a windows it is migration from windows to linux server not page is not redirecting properly . I've tried to change .htacess on main public_html directory. yet no use if there is any thing else I should check?

Regards
Reply




Theme © iAndrew 2016 - Forum software by © MyBB