Error codeigniter in Azure: does not access subfolders

1

Ihaveanazurehostede-commercesystem( link ) Developed in Framework CodeIgniter 1.7.2 The system is loaded in the index. However, I can not load the other url that are in the subfolders: Contact, Adm, Cart ....

My .htaccess:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

I have already set up the files:

  • config.php (base (). url)
  • database.php (connection)
  • autoload.php (url)

Are there any other settings to be made, either in azure or codeigniter?

    
asked by anonymous 04.09.2017 / 20:16

1 answer

1

Resolution:

  • Remove the .htacces file from the system since in azure it is not used
  • Create the file with web.config with this code (insert in the root folder of the project). It will allow you to access the pages through friendly urls:
  • <?xml version="1.0" encoding="UTF-8"?>
         <configuration>
            <system.webServer>
                 <rewrite>
                     <rules>
                         <rule name="Clean URL" stopProcessing="true">
                             <match url="^(.*)$" />
                             <conditions>
                                 <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                                 <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                             </conditions>
                             <action type="Rewrite" url="index.php/{R:1}" appendQueryString="false" />
                         </rule>
                     </rules>
                 </rewrite>
             </system.webServer>
         </configuration>
        
    05.09.2017 / 20:28