freak Posted December 23, 2010 Report Share Posted December 23, 2010 Izmantoju modrewrite, lai veidotu permalinkus. Viss, ok tikai problema rodas, ja gribu izveidot permalinku ar diviem / , piemeram: domen.lv/aa/bb. Problema rodas, jo tad visam bildes, kas ir majas lapaa, adrese izmainas uz domen.lv/aa/picture.jpg , bet vajag domen.lv/picture.jpg ko man darit? Kods: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^about index.php?sadala=about [L,QSA] RewriteRule ^aa/bb index.php?sadala=test [L,QSA] <- nestrada Quote Link to comment Share on other sites More sharing options...
Blitz Posted December 23, 2010 Report Share Posted December 23, 2010 (edited) RewriteRule (.*).jpg$ /$1.jpg [L] Sito mosk ieliec sakumā. Idejiski ja urlī redz bildi tad rewraito uz parent direktoriju. Edited December 23, 2010 by Blitz Quote Link to comment Share on other sites More sharing options...
freak Posted December 23, 2010 Author Report Share Posted December 23, 2010 RewriteRule (.*).jpg$ /$1.jpg [L] Sito mosk ieliec sakumā. Idejiski ja urlī redz bildi tad rewraito uz parent direktoriju. Īsti neder, jo tad tajās sadaļās , kur ir viens "/" , bildes rādas nepareizi. Quote Link to comment Share on other sites More sharing options...
Blitz Posted December 23, 2010 Report Share Posted December 23, 2010 RewriteRule ^/(.*)/(.*).jpg$ /$1/$2.jpg [L] Quote Link to comment Share on other sites More sharing options...
rpr Posted December 23, 2010 Report Share Posted December 23, 2010 varbūt vienkārši pietiks, ja htmlā pieliksi <base href="/" /> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.