0

我正在使用 OSCLASS 脚本,并且正在使用 .htaccess 来重写 url。OSCLASS 生成的默认 .htaccess 提供了这样的网址 ( http://myhost.com/saleon/vehicles/cars/honda-civic_i28 ) 我想在每个网址的末尾添加“.htm”。所以我的网址看起来像这样(http://myhost.com/saleon/vehicles/cars/honda-civic_i28.htm)。有没有人知道如何在 htaccess 中做到这一点。我的 .htaccess 代码如下:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /saleon/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /saleon/index.php [L]
</IfModule>

谢谢您的帮助。

4

1 回答 1

0

没有必要在.htaccess. 您可以在 oc-admin: 中更改它,Settings > Permalinks然后单击Show rules

例如,列表的默认永久链接如下所示:{ITEM_TITLE}-i{ITEM_ID}它会生成您之前提到的 url。但是,如果您更改以下值的值,您将获得一个以 .htm: 结尾的 url {ITEM_TITLE}-i{ITEM_ID}.htm

于 2013-02-21T10:45:25.320 回答