请先告诉我: http://www.example.com/en.html/spirit-levels/type-70
以上网址是否对 SEO 友好?
如果没有,请告诉我如何使用 .htaccess 从上面的 url 中删除 .html。
谢谢
最佳答案
Can I know which framework you are using
or used below code in .htaccess placed in root of your application
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
#.php .html or other
if you are using any framework like codeigniter just open config.php in config folder and use below code
$config['url_suffix'] = ''; // make it blank
关于php - 如何使用 .htaccess 删除 url 之间的扩展名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38761940/