nginx url rewrite blesta -


could me convert url rewrite

######################################################## # package:    minphp # filename:   .htaccess ########################################################  <files ~ "\.(pdt)$">    order deny,allow    deny </files>  # protect against clickjacking #header append x-frame-options "sameorigin"  rewriteengine on  # force https #rewritecond %{https} !=on #rewriterule ^ https://%{http_host}%{request_uri} [r=307,ne,l]  rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^(.*)$ index.php  rewritecond %{request_uri} ^(.*)/install.php$ rewriterule install.php %1/install/ [r=301,l] 

here our current rewrite works fine few errors. such /index.php/ still being there in links when should /client/login , pages forces download file labled "download"

# disallow access file .pdt extension   location ~ (\.pdt) {     return 403;   }    location / {   error_page     404 = @blesta; #if file doesn't exist   log_not_found  off;    rewrite ^(.*)$ /index.php last;    # access install file   if ($request_uri ~ "^(.*)/install.php$"){     rewrite install.php /%1/install/ redirect;    }   } 

the nginx rewrite rules blesta:
https://github.com/cloudrck/blesta-nginx/blob/master/sites-available/blestav3

how remove /index.php/ in url:

edit lib/init.php, change:

define("htaccess", file_exists(rootwebdir . ".htaccess")); 

to:

define("htaccess", true); 

ref: http://docs.blesta.com/display/user/installing+blesta#installingblesta-systemconfiguration


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -