Regular expression i htaccess regex, PCRE, POSIX, upotreba Apache .htaccess , mod_rewrite |
|
Alati teme | Način prikaza |
|
26. 10. 2005. | #1 |
Designer guy
Wrote a book
|
.htaccess problem
Kôd:
#DirectoryIndex index.php index.html #Options +FollowSymLinks #RewriteBase /relative/web/path/ <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) - [PT,L] RewriteRule ^(.*) index.php </IfModule> hvala unapred. |
26. 10. 2005. | #2 |
Dejan Katašić
Wrote a book
Datum učlanjenja: 10.06.2005
Lokacija: Novi Sad
Poruke: 1.017
Hvala: 129
86 "Hvala" u 43 poruka
|
Valjda pomoću DirectoryIndex.
|
26. 10. 2005. | #3 | |
Goran Pilipović
Sir Write-a-Lot
|
Evo ti pogledaj nešto na čemu trenutno radim. Ceo sajt je u index.php, a klijent zahteva da svaki link počinje sa "logo_design_"...
RewriteRule ^logo_design_(.*)?\.php$ index.php?params=$1 a sve portfolio strane počinju sa "logo_portfolio/" pa je rule za to (folder logo_portfolio uopšte ne postoji) RewriteRule ^logo-portfolio/(.*)?\.php$ portfolio.php?params=$1 Ostale strane, na primer "order.php", kao i *.htm (zaostavština sa starog sajta) se najnormalnije otvaraju. ovako izgleda ceo .htaccess: Citat:
a kasnije će biti na www.elogodesign.com Što se tebe tiče, postavi: DirectoryIndex index.html index.php i skloni RewriteRule ^(.*) index.php a pošto ja ipak nisam regexp guru, ja radim po staroj dobroj "trial and error" metodi
__________________
Goran Pilipović a.k.a. Ugly Fingers Bradley f.k.a. bluesman I don't always know what I'm talking about but I know I'm right! |
|
26. 10. 2005. | #4 |
Designer guy
Wrote a book
|
OK, hvala puno Gorane
|
|
|
Slične teme | ||||
Tema | Početna poruka teme | Forum | Odgovori | Poslednja poruka |
[.htaccess] problem kod broja strane | apex | Regular expression i htaccess | 4 | 13. 11. 2009. 10:42 |
.htaccess | Suske | Sva početnička pitanja | 1 | 11. 06. 2009. 18:28 |
Htaccess, mod_rewrite problem | nEdImT | Regular expression i htaccess | 5 | 29. 01. 2008. 15:25 |
.htaccess pitanjce | Dzordz | Regular expression i htaccess | 7 | 07. 03. 2007. 14:47 |
.htaccess problem | Blood | Regular expression i htaccess | 11 | 10. 10. 2006. 14:41 |