Forum

url toolkit for drupal 8 ???

zen
22 May 2016, 08:35
how to implement drupal 8 url toolkit ?


in Nginx reference https://www.nginx.com/resources/wiki/start/topics/recipes/drupal/
    # In Drupal 8, we must also match new paths where the '.php' appears in the middle,
# such as update.php/selection. The rule we use is strict, and only allows this pattern
# with the update.php front controller. This allows legacy path aliases in the form of
# blog/index.php/legacy-path to continue to route to Drupal nodes. If you do not have
# any paths like that, then you might prefer to use a laxer rule, such as:
# location ~ \.php(/|$) {
# The laxer rule will continue to work if Drupal uses this new URL pattern with front
# controllers other than update.php in a future release.

location ~ '\.php$|^/update.php' {
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
zen
22 May 2016, 10:41
any update for drupal 8 ?
UrlToolkit {
ToolkitID = drupal
RequestURI isfile Return
Match ^/favicon.ico$ Return
Match /(.*)\?(.*) Rewrite /index.php?q=$1&$2
Match /(.*) Rewrite /index.php?q=$1
}
zen
22 May 2016, 19:13
sorry

url toolkit above still work

I am missing curl extension for php ==> apt-get install php5-curl

*) thank's for your amazing hiawatha

Hugo Leisink
23 May 2016, 19:19
You're welcome.
Joe Shmoe
23 May 2016, 20:58
Here is what I have been using. This incorporates security features from the .htaccess file which Hiawatha will not read.
UrlToolkit {
ToolkitID = drupal
Match /sites/default/files/private DenyAccess
Match /sites/default/files/(.*)\.php DenyAccess
Match \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\..*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock))$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$ DenyAccess
RequestURI isfile Return
Match ^/favicon.ico$ Return
Match /(.*)\?(.*) Rewrite /index.php?q=$1&$2
Match /(.*) Rewrite /index.php?q=$1
}
zen
24 May 2016, 13:54
thank's Joe Shmoe
This topic has been closed.