Regular expression i htaccess regex, PCRE, POSIX, upotreba Apache .htaccess , mod_rewrite |
|
Alati teme | Način prikaza |
16. 02. 2009. | #1 |
old school
Expert
Datum učlanjenja: 30.04.2006
Poruke: 464
Hvala: 39
48 "Hvala" u 28 poruka
|
crtica u reg_exp u mod_rewrite
Osecam se i malo glupo zbog ovog pitanja, al ne mogu da skontam vec par sati sta je problem
Ali u cemu je problem sa ovim RewriteRule ^([a-z0-9\-_]+) A ovo radi: RewriteRule ^([-_a-z0-9]+) |
17. 02. 2009. | #2 |
Ivan Dilber
Sir Write-a-Lot
|
ne bi smelo da bude problema, sem ako to printas kroz nesto pa ti to pojede \escape
__________________
Leadership is the art of getting people to want to do what you know must be done. |
17. 02. 2009. | #3 |
old school
Expert
Datum učlanjenja: 30.04.2006
Poruke: 464
Hvala: 39
48 "Hvala" u 28 poruka
|
.htaccess ...
RewriteRule ^([-_a-z0-9]+)/$ category.php?id=$1 [L] ovo radi RewriteRule ^([\-_a-z0-9]+)/$ category.php?id=$1 [L] Ovo mi daje 404 error za isti url |
17. 02. 2009. | #4 |
Ivan Dilber
Sir Write-a-Lot
|
na mom serveru (apache 2.2) oba regexa isto rade?
ako mozes ukljuci RewriteLog (mora u httpd.conf) pa vidi sta se tacno desava.. ako ne, stavi spoljni redirect [R] pa vidi gde te baca u ovom slucaju koji ne radi..
__________________
Leadership is the art of getting people to want to do what you know must be done. Poslednja izmena od ivanhoe : 17. 02. 2009. u 01:35. |
18. 02. 2009. | #5 |
Dusko Petrovic
Professional
|
probaj da - stavish na kraj liste karaktera. imao sam slican problem jednom i mislim da je ovo bilo reshenje
RewriteRule ^([_a-z0-9\-]+)/$ category.php?id=$1 [L] ili mozda i bez escapeovanja(kako se ovo kaze na srpskom?) RewriteRule ^([_a-z0-9-]+)/$ category.php?id=$1 [L]
__________________
I know it all, I just can't remember it all at once Blog / Pisanije / Best Engagement Rings / Blues DVDs |
18. 02. 2009. | #6 |
Ivan Dilber
Sir Write-a-Lot
|
hmm, escape-ovanje bi moralo da radi, crtica je specijalni karakter unutar [] i sem na pocetku i kraju mora da se escape-uje
__________________
Leadership is the art of getting people to want to do what you know must be done. |
18. 02. 2009. | #7 |
Dusko Petrovic
Professional
|
u pravu si, mora da se escapeuje, ali svakako neka proba da je stavi na kraj
__________________
I know it all, I just can't remember it all at once Blog / Pisanije / Best Engagement Rings / Blues DVDs |
19. 02. 2009. | #8 |
old school
Expert
Datum učlanjenja: 30.04.2006
Poruke: 464
Hvala: 39
48 "Hvala" u 28 poruka
|
nisam jos ukljucio log ili probao redirect, imam dosta posla, pa nikako da probam.
Ali inace, probao sam da bude i na kraju, i ne radi. Pada mi na pamet da nije sam fajl nesto sjeban |
|
|
Slične teme | ||||
Tema | Početna poruka teme | Forum | Odgovori | Poslednja poruka |
Pomoć oko mod_rewrite | pitchweis | Regular expression i htaccess | 8 | 14. 10. 2008. 16:33 |
mod_rewrite i redirect 301 | Mitrović Srđan | Regular expression i htaccess | 3 | 11. 09. 2008. 00:33 |
mod_rewrite | Predrag Gajić | PHP | 3 | 27. 02. 2008. 17:28 |
problem sa mod_rewrite... | krcko | Regular expression i htaccess | 5 | 08. 06. 2007. 04:03 |
mod_rewrite problem | McChoban | Regular expression i htaccess | 8 | 26. 08. 2006. 16:13 |