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
mod rewrite help

 
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
vedran



Joined: 08 Sep 2003
Posts: 458

PostPosted: 13.06.2005 17:15    Post subject: mod rewrite help Add user to your forum ignore list Reply with quote

Evo već puna dva dana proučavam php i uspio sam nekako enejblati mod_rewrite na apacheu..

I sad se malo igram s url-ovima..

U .htaccess file sam stavio:
Code:
RewriteEngine On
Options +FollowSymlinks
RewriteRule ^phone/(.*)/ index.php?phone=$1

I sad mi rewritea recimo u ..phone/motorola_e550/

A ja bi želio sloziti RewriteRule da uzima vrijednost iz querystringa i servira ju bez onog prvog direktorija..
Primjer:
www.mi3dot.org/index.php?show=contact ->>>> www.mi3dot.org/contact..

Puno hvala
Back to top
View user's profile Send private message Send e-mail Visit poster's website
1ONE



Joined: 13 Mar 2004
Posts: 136
Location: Zagreb

PostPosted: 14.06.2005 00:38    Post subject: Add user to your forum ignore list Reply with quote

Za ovaj mi3dot primjer ( www.mi3dot.org/index.php?show=contact ->>>> www.mi3dot.org/contact.. )

Code:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME}  -d
RewriteRule  ^.*$  -  [L]

RewriteRule ^([^/]+)/$   index.php?show=$1 [L]


S tim da ovaj moj rewrite prvo pogleda dali postoji folder koji tražiš ( npr. /forum ) i ako da , onda te "pusti" tamo Smile

_________________
have fun
Back to top
View user's profile Send private message
smasher



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

PostPosted: 14.06.2005 09:50    Post subject: Add user to your forum ignore list Reply with quote

a mogu ja malo OT-at?
Ja imam jedan problem. postavio sam .htaccess da mi rewrajta iz news.php?id=54 u news/54. Al mene zanima jel ja u php-u onda moram nešto mjenjat ili ne? Jer ja normalno imam $_REQUEST['id'];

jer ovak normalno mi ne radi. on meni otvori stranicu news.php bez id-ja, napisao ja news/100 ili news/ ili samo news, ili news/news/news ili news/news/kreten/bla/bla/bla ... sve mi je isto, samo otvori stranicu news.php i to još bez css styla. Dobro to je druga priča. Zanima me jel ja moram isto pozivat id sa $_REQUEST-om ili nekak drukčije?

_________________
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
nel`chee



Joined: 08 Jul 2004
Posts: 2087
Location: Rijeka

PostPosted: 09.12.2006 18:36    Post subject: Add user to your forum ignore list Reply with quote

da ne otvaram novi topic, pokusavam srediti da mi search radi pomocu get metode, ali mi ne uspijeva.
npr za neki link /brushes/search/?keyword=swirl
Code:
RewriteRule ^brushes/search/\?keyword=(.*)$ /?p=search&keyword=$1 [nc]

isprobala sam da mi umjesto search stranice otvara neku drugu i jednostavno ne reagira. bez escape-a, sa escape-om, umjesto (.*) ([a-z]+), bez $, sa $... nista ne radi.

_________________
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: 09.12.2006 20:28    Post subject: Add user to your forum ignore list Reply with quote

"?blabla" nije dio URL-a, već nešto što se zove query string... ne možeš matchati nešto što nije dio URL-a

Code:
RewriteRule ^brushes/search/$ /?p=search [QSA]
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: 09.12.2006 22:03    Post subject: Add user to your forum ignore list Reply with quote

wee, radi Very Happy
hvala! Mr. Green

_________________
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: 10.12.2006 12:56    Post subject: Add user to your forum ignore list Reply with quote

Radi?? Iskreno, QSA sam ti stavio samo kao hint, nisam vjerovao da će od prve Embarassed
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