框架学习

magento 2的宝塔伪静态设置

  1. location / {
  2. index index.html index.php; ## Allow a static html file to be shown first
  3. try_files $uri $uri/ @handler;
  4. expires 30d;
  5. }
  6.  
  7. location /var/export/ { ## Allow admins only to view export folder
  8. auth_basic "Restricted"; ## Message shown in login window
  9. auth_basic_user_file htpasswd; ## See /etc/nginx/htpassword
  10. autoindex on;
  11. }
  12. location /. { ## Disable .htaccess and other hidden files
  13. return 404;
  14. }
  15.  
  16. location @handler { ## Magento uses a common front handler
  17. rewrite / /index.php;
  18. }
  19.  
  20. location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
  21. rewrite ^(.*.php)/ $1 last;
  22. }