SEO 友好网址上的错误


Options +FollowSymLinks
RewriteEngine On
RewriteRule ^([a-zA-Z0-9-]+)/?$ listenAlbum.php?url=$1
RewriteRule ^([a-zA-Z0-9-]+)/category/?$ category.php?name=$1

我有这个 .htaccess 文件当我尝试打开 http://mywebsite.com/my-album 时,它工作得很好但是当我尝试像这样在类别页面上导航时http://mywebsite.com/category/category-name 它给出 404 未找到任何人都可以帮忙吗?

第二个

重写规则,如果你的htaccess说URL应该http://mywebsite.com/category-name/category/

htaccess更改为:

RewriteEngine On
RewriteRule ^([a-zA-Z0-9-]+)/?$ listenAlbum.php?url=$1
RewriteRule ^category/([a-zA-Z0-9-]+)/?$ category.php?name=$1

最新更新