1

I have a codeigniter application running in Linux environment and would like to migrate it to Windows environment.

I migrated the files via FTP. The homepage worked correctly with images and styles, but the links do not and show error 404.

Does it have to do with htaccess and web.config?

5
  • so links dont work? did u hover over those links to see the url they point to? is there any difference in the links between linux/windows env? Commented Oct 7, 2019 at 18:55
  • @ilias-sp Apparently no. The link remains domain.com/test Commented Oct 7, 2019 at 19:13
  • maybe this helps? gist.github.com/wmandai/d28cc45f10a19eec0fcb Commented Oct 7, 2019 at 19:20
  • @Vickel still the same thing. Could it have to do with Plesk's temporary link? I am using http://xxx.xxx.xxx.xx/plesk-site-preview/example.com/xxx.xxx.xxx.xx/ instead of http://example.com directly. Commented Oct 7, 2019 at 20:14
  • Have you tried to rewrite these links with IIS outbound rule? learn.microsoft.com/en-us/iis/extensions/url-rewrite-module/… Commented Oct 8, 2019 at 8:44

1 Answer 1

1

Resolved by rewriting htaccess for web.config, and changing base_url.

<system.webServer>
    <rewrite>
        <rules>
            <rule name="Main Rule" stopProcessing="true">
                <match url=".*" />
                <conditions logicalGrouping="MatchAll">
                <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                </conditions>
                <action type="Rewrite" url="index.php/{R:0}" />
            </rule>
        </rules>
    </rewrite>
</system.webServer>

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.