Sugarfree Posted July 31, 2008 Report Share Posted July 31, 2008 Kā izdarīt tā, ka pievienojot jaunu sadaļu man nevajadzētu pievienot atkal jaunu RewriteRule priekš jauna linka? Tagad tas izskatās tā: RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.abc\.lv$ [NC] RewriteRule ^(.*)$ http://abc.lv/$1 [R=301,L] RewriteRule ^par-mums/$ par-mums.html RewriteRule ^jaunumi/$ jaunumi.html RewriteRule ^galerija/$ galerija.html RewriteRule ^kontakti/$ kontakti.html RewriteRule ^partneri/$ partneri.html RewriteRule ^vel-kautkas/$ vel-kautkas.html RewriteRule ^vel-kautkas/$ vel-kautkas.html RewriteRule ^vel-kautkas/$ vel-kautkas.html utt... Link to comment Share on other sites More sharing options...
bubu Posted July 31, 2008 Report Share Posted July 31, 2008 Tev tiešām šim vajag mod_rewrite izmantot? Taisi index.html failus parastās direktorijās: /webroot/par-mums/index.html /webroot/jaunumi/index.html /webroot/galerija/index.html ... un URL'is izskatīsies identiski, t.i. http://domeins.lv/jaunumi/ ... Link to comment Share on other sites More sharing options...
Sugarfree Posted July 31, 2008 Author Report Share Posted July 31, 2008 Njā, nu tā laikam tad arī darīšu... Paldies Link to comment Share on other sites More sharing options...
Kaitnieks Posted August 1, 2008 Report Share Posted August 1, 2008 (edited) vari mēģināt arī kaut ko tamlīdzīgu: RewriteRule ^(.*?)/$ $1.html Edited August 1, 2008 by Kaitnieks Link to comment Share on other sites More sharing options...
Recommended Posts