Може ли някой да ми помогне да конвертирате този URL пренапише
########################################################
# package: minPHP
# filename: .htaccess
########################################################
<Files ~ ".(pdt)$">
order deny,allow
deny from all
</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]
Тук е нашата текущата пренаписване работи добре, ноняколко грешки. като /index.php/ все още е в линковете, когато трябва да бъде / клиент / вход и някои страници ви принуждават да изтеглите файл, маркиран като "download"
# Disallow access to any file with .pdt extension
location ~ (.pdt) {
return 403;
}
location / {
error_page 404 = @blesta; #IF file doesn"t exist
log_not_found off;
rewrite ^(.*)$ /index.php last;
# For access to install file
if ($request_uri ~ "^(.*)/install.php$"){
rewrite install.php /%1/install/ redirect;
}
}
Отговори:
1 за отговор № 1Правилата за пренаписване на nginx за blesta:
https://github.com/cloudrck/blesta-nginx/blob/master/sites-available/blestav3
Как да премахнете /index.php/ в URL адреса:
Редактиране на lib / init.php, промяна:
define("HTACCESS", file_exists(ROOTWEBDIR . ".htaccess"));
Да се:
define("HTACCESS", true);
код: http://docs.blesta.com/display/user/Installing+Blesta#InstallingBlesta-SystemConfiguration