nginx configuration for URL URI paths
- by hachiari
I want to switch my webserver from apache to nginx
however I have difficulties in converting my current htaccess to nginx configuration
the conditions that I need:
I want everything to be like apache, it can read file such as js, css, jpg, png ,etc
I am currently using CodeIgniter PHP frameword, it uses the URI system thingy...
So my htaccess configuration for CodeIgniter URI is:
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]
RewriteCond %{HTTP_HOST} ^www.domain.tld [NC]
RewriteRule ^(.*)$ hxtp://domain.tld/$1 [L,R=301]
I am also using minify to compress my css and js files, so the way I call my css and js is like:
hxtp://domain.tld/?=css
hxtp://domain.tld/?=js
I tried some configurations from the net, but I could only solve problem no 2
Thank You