Apache 最后,如何使用斜杠实现友好URL?

Apache 最后,如何使用斜杠实现友好URL?,apache,.htaccess,friendly-url,seo,Apache,.htaccess,Friendly Url,Seo,My.htaccess文件具有当前设置: Options -Indexes RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ $1\.php 当我输入mydomain.com/file时没有问题,但是当我访问mydomain.com/file/时,我得到错误500 没有名为“文件”的文件夹,任何路径都会出现此问题。尝试将-Mul

My.htaccess文件具有当前设置:

Options -Indexes

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1\.php
当我输入mydomain.com/file时没有问题,但是当我访问mydomain.com/file/时,我得到错误500


没有名为“文件”的文件夹,任何路径都会出现此问题。

尝试将-MultiViews添加到选项中。如果它仍然出现故障,请查看apache错误日志,您将得到问题的完整解释。

Hi,您有一个nginx问题:“我需要在domain.com/es中打开domain.com/?q=es”。页面消失了,但这里有一个答案:if($args~q=(..){set$dom$1;rewrite(.*)/$dom;break;}