waplet Posted February 1, 2010 Report Share Posted February 1, 2010 RewriteEngine On RewriteRule ^(.*)$ index.php?page=$1 [QSA,L] šads ir .htaccess... un viņš tagad ņem arī <link rel="stylesheet" href="style.css" type="text/css" /> kā GET atribūtu :? kā to labot? tiešām esmu iesācejs iekš mod rewrite. Link to comment Share on other sites More sharing options...
marrtins Posted February 1, 2010 Report Share Posted February 1, 2010 Aptuveni šādi: RewriteEngine On RewriteCond %{REQUEST_URI} !(.*)(gif|jpg|png|ico|js|css|jpeg|avi|wmv|exe|txt|mp3|php|zip|swf|flv|html?|svg|xspf|utt|utt)$ [NC] RewriteRule ^(.*)$ index.php?page=$1 [QSA,L] Link to comment Share on other sites More sharing options...
2easy Posted February 2, 2010 Report Share Posted February 2, 2010 (edited) lai mod_rewrite neaiztiktu reālos folderus/failus, sākumā ieliec šo: RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteCond %{REQUEST_FILENAME} -f RewriteRule .* - [L] aiz tā jau var rakstīt visas rules, ko vien gribi :)) pēc tam visu, kas ir iekš html (bildes, js, css, ...), vajag rakstīt ar absolūto uri /style.css Edited February 2, 2010 by 2easy Link to comment Share on other sites More sharing options...
waplet Posted February 2, 2010 Author Report Share Posted February 2, 2010 Paldies! Link to comment Share on other sites More sharing options...
waplet Posted February 14, 2010 Author Report Share Posted February 14, 2010 (edited) Unlocked: Problēma... bet piemēram.. ja man tagad sakrīt faila nosaukumi ar ?page= linka nosaukumu... tad viņš atver pašu pēhāpē failu, kaut arī galotne nav norādīta, ka ir .php Vai glabāt.. satura php failus kadā sub direktorijā? lai tādas problēmas nerastos ? Edited February 14, 2010 by waplet Link to comment Share on other sites More sharing options...
2easy Posted February 14, 2010 Report Share Posted February 14, 2010 vēlreiz? tb konkrētāk vari pateikt, kāds ir pilns .htaccess, kāda ir adrese, ar kuru rodas problēma, kāds ir tas satura .php faila nosaukums? Link to comment Share on other sites More sharing options...
waplet Posted February 14, 2010 Author Report Share Posted February 14, 2010 Nē nē viss ok,sataisīju :D Link to comment Share on other sites More sharing options...
Recommended Posts