Migrate from web.config to .htaccess in an Angular/Codeigniter project -


we have codeigniter project contains of 2 parts. front-end built on angular , backend (api). angular-code in /app/ , ci's controllers , configurations in /_api/ folder. base webapp in "start"-controller.

we're trying migrate web server iis ubuntu 16.04 , started running problems since haven't used our .htaccess file before. end on ci's 404-page wherever try go.

here's web.config:

<configuration>   <system.web>     <customerrors mode="off" />   </system.web>   <system.webserver>     <rewrite>       <rules>         <rule name="rewrite index.php">           <match url="index.php|robots.txt|images|test.php" />           <action type="none" />         </rule>         <rule name="rewrite ci index">           <match url="api/*" />           <conditions>             <add input="{request_filename}" pattern="js" negate="true" />           </conditions>           <action type="rewrite" url="index.php/api/{r:0}" />         </rule>         <rule name="rewrite ci index 2">           <match url=".*" />           <conditions>             <add input="{request_filename}" pattern="css|js|jpg|jpeg|png|gif|ico|htm|html|eot|woff|ttf|svg|php" negate="true" />           </conditions>           <action type="rewrite" url="index.php/start/" />         </rule>       </rules>     </rewrite>     <caching enabled="false"></caching>     <staticcontent>       <clientcache cachecontrolmode="disablecache" />       <remove fileextension=".woff" />       <!-- in case iis has mime type -->       <mimemap fileextension=".woff" mimetype="application/x-font-woff" />       <remove fileextension=".woff2" />       <!-- in case iis has mime type -->       <mimemap fileextension=".woff2" mimetype="application/x-font-woff2" />     </staticcontent>   </system.webserver> </configuration> 

okay! problem wasn't .htaccess-file mainly. biggest problem move windows based web server linux based one. figured out had rename of our ci-controllers , models start capital letters.


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -