Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
rewriterule iz .htaccesa ne radi

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
jojo



Joined: 27 Jan 2005
Posts: 1591
Location: insula aurea

PostPosted: 29.12.2005 15:54    Post subject: rewriterule iz .htaccesa ne radi Add user to your forum ignore list Reply with quote

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^novosti/(.+)/ novosti/index.php?id=$1 [nc]

ovo je u fileu... zašto ne radi?
ništa ne javlja samo pokazuje sve ko i prije...

_________________
deviant / malomorgen / videoholik / cimer fraj
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 29.12.2005 16:57    Post subject: Add user to your forum ignore list Reply with quote

Confused probaj
Code:
RewriteBase /
RewriteRule ^novosti/(.+)/?$ novosti/index.php?id=$1 [nc]


BTW obavezno provjeri što ti dođe u 'id' preko GET prije nego što ubaciš u query u bazu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
smasher



Joined: 10 Jan 2004
Posts: 229
Location: Zaprešić

PostPosted: 29.12.2005 19:33    Post subject: Re: rewriterule iz .htaccesa ne radi Add user to your forum ignore list Reply with quote

jojo wrote:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^novosti/(.+)/ novosti/index.php?id=$1 [nc]

ovo je u fileu... zašto ne radi?
ništa ne javlja samo pokazuje sve ko i prije...



kolko mi se čini iz tvojih riječi (možda sam u krivu) al mislim da ti pozivaš i dalje /novosti/index.php?id=ID ????

ako je tako, probaj sa upisivanjem /novosti/ID/ u address bar, a ako nije tako, moje najdublje isprike Wink

_________________
http://3DHR.net - Srce hrvatskih 3d artista
http://www.Rhino3DHelp.com
Back to top
View user's profile Send private message Visit poster's website
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 29.12.2005 19:39    Post subject: Add user to your forum ignore list Reply with quote

Hmm, Smasher's got a point there

Ako rule ne radi onda će ti javiti Server Error ili 404, a neće sve biti kao i prije
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jojo



Joined: 27 Jan 2005
Posts: 1591
Location: insula aurea

PostPosted: 30.12.2005 09:16    Post subject: Add user to your forum ignore list Reply with quote

ooo pa ja sam te rewrite rulove malo krivo shvatila... mislila sam da oni automatski kad se poziva adresa .../novosti/index.php?id=5 to u browseru mijenja u /novosti/5/
Ali u biti radi... samo moram promijeniti path do css filea jer je sad još dvije točkice unazad

hvala, još jednom ste me prosvijetlili Cool

_________________
deviant / malomorgen / videoholik / cimer fraj
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
retro_one



Joined: 16 Sep 2003
Posts: 880
Location: DUBRAVA.

PostPosted: 30.12.2005 10:14    Post subject: Add user to your forum ignore list Reply with quote

jojo wrote:
Ali u biti radi... samo moram promijeniti path do css filea jer je sad još dvije točkice unazad


kad koristis rewrite rule trebala bi koristiti apsolutni link do svih slika i svih css-ova

_________________
Just your average eccentric programmer.
Back to top
View user's profile Send private message
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 30.12.2005 16:33    Post subject: Add user to your forum ignore list Reply with quote

Da, ja sam jednom probao relativno isfurat .... SMRT Sad
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nel`chee



Joined: 08 Jul 2004
Posts: 2087
Location: Rijeka

PostPosted: 30.12.2005 16:37    Post subject: Add user to your forum ignore list Reply with quote

agreed...
ALI pazi na php includeove, njima url mora biti relativan kao da je bez rewrite-a

_________________
art & design portfoliofree Photoshop brushes stuffsketchblogfacebook
Back to top
View user's profile Send private message Visit poster's website Twitter profile
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 30.12.2005 17:17    Post subject: Add user to your forum ignore list Reply with quote

Includeovi su interni, HTTP requestovi su eksterni. HTTP requestovi se rewrite-aju preko rewrite enginea dok se unutarnji serverski procesi odvijaju normalno na pravom filesystemu.

Važno je znati da rewrite ruleovima postižemo lukavu varku da naš site ima strukturu kakvu vidi browser ili spider, ali na filesystemu zapravo nema. Time radimo dobar Web jer su URL-ovi namijenjeni da gradimo jedinstvene identifikatore za sadržaj, a ne da preslikavamo nekakav filesystem (što je default ponašanje servera).

Nadam se da sad znaš sve o mod_rewrite Wink
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group