如何在子域或子文件夹中为seo友好的URL编写htaccess重写规则

时间:2020-07-01 13:36:24

标签: .htaccess seo

这是我的原始链接:

http://localhost/m/news/berita/lorem-ipsum-dolor-sit-amet,-consectetur-adipisicing-elit,-sed-do-2

我想更改为:

RewriteEngine On
RewriteRule ^([^\.]+)$ $1.php [NC,L]
RewriteRule ^/berita/([^/]+)$ /detail-news?q=$1 [L]

我已经使用过这种尚未使用的方法:

getContentPane().removeAll();

但是我上面使用的htaccess无法正常工作,有人知道解决方案和问题吗?

0 个答案:

没有答案