search

Home  >  Q&A  >  body text

phpstudy2018 How to achieve pseudo-static web pages

I used the 2016 version of phpstudy before. The website built with my website building program can achieve pseudo-static access. For example, http://localhost/blog.php can be converted into http://localhost/blog/ for access, and the root There is no blog folder in the directory.

Using the 2018 version of phpStudy, I found that the website was inaccessible as soon as it was installed. After working for a long time, I found that as long as there is .htaccess in the root directory of the website, it cannot be accessed. After deleting the .htaccess file, it can be accessed, but this also It can only be accessed through http://localhost/blog.php, and cannot be accessed through http://localhost/blog/

So I would like to ask you all, how to set up the 2018 version of phpstudy Only then can we easily achieve pseudo-static web pages like the 2016 version

小千小千2316 days ago3392

reply all(2)I'll reply

  • ringa_lee

    ringa_lee2018-07-26 21:39:11

    Pseudo-static rules have nothing to do with the environment version. If you use apache, the rules need to be written in the .htaccess file. If you use nginx, find nginx.conf. You can access it by deleting .htaccess. Obviously There is a problem with the code in this file

    reply
    0
  • 小千

    The same .htaccess is fine in 2016, but there is a problem in 2018. How to do this

    小千 · 2018-07-27 03:40:48
  • Cancelreply