Enable WordPress's custom filename of pseudo static under Linux XAMPP
- 2020-05-15 03:20:25
- OfStack
Enable custom file name (pseudo-static) for WordPress under Linux XAMPP
After the installation of WORDPRESS, to enable pseudo-static functions, 1 is to look good, but also to better SEO, according to your configuration, you just need to put the following contents into the root directory.
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
But my bias does not work, this configuration is certainly no problem, I put the file path in the root directory is no problem. And I use XAMPP, I think some of these may be restricted by default. htaccess file produces the effect of, through search in the official documentation apache: http: / / httpd apache. org/docs / 2.0 / howto/htaccess html, if let was mentioned. htaccess file work, must increase AccessFileName:
AccessFileName .htaccess
So I added the first line in httpd.conf, but it still didn't work. I found the answer in a forum later, and I also need to allow the storage.
<Directory "/srv/www/htdocs/myapp">
AllowOverride All
</Directory>
After restarting apache, the pseudo-static functionality is finally done.
Thank you for reading, I hope to help you, thank you for your support of this site!