2013-02-20 55 views
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代码如下:在OSCLASS脚本中用.htaccess将.htm放在URL末尾

<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> 

感谢您的帮助。

回答

0

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

例如,该列表的默认永久链接如下所示:{ITEM_TITLE}-i{ITEM_ID}并且它会生成前面提到的url。但是,如果您更改了以下值,则会获得以.htm结尾的网址:{ITEM_TITLE}-i{ITEM_ID}.htm