Old 09-11-2005, 05:57   #1 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 7,482
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
friendly urls again

sooo, there we go. After searching up and down and getting more confused with everything I read, I thought I'd ask you guys how to do the damned thing.

I have a index.php?project=02 type of link, that I want to turn into /project/02/, /project02/ or /folio/02/ Any of these would work, I really don't care that much which one.
So, is there anything else apart from mod_rewrite that I should look into?

Hope you understand what I mean, there's a thick cloud of fog inbetween my ears right now...

Cheers, beers and all that

Last edited by emil : 09-11-2005 at 11:13. Reason: fixed thread title spelling
  Reply With Quote
Old 09-11-2005, 07:10   #2 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,205
Quote:
Originally Posted by emilpaun
I have a index.php?project=02 type of link, that I want to turn into /project/02/

Something like
Code:
RewriteEngine On RewriteRule ^/project/([0-9]+)$ index.php?project=$1 [L]
  Reply With Quote
Old 09-11-2005, 07:45   #3 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 7,482
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
thanks. tried that, somehow, the output is the same. oh well, I might as well give up. thanks, beers
  Reply With Quote
Old 09-11-2005, 07:47   #4 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,205
can you show us exactly what you're doing?
  Reply With Quote
Old 09-11-2005, 07:48   #5 (permalink)
Brown
volkswagen yellow & gold
 
Brown's Avatar
 
Join Date: Apr 2003
Location: london, england.
Posts: 6,147
you'll have to make sure that mod_rewrite is turned on in the apache config file.
  Reply With Quote
Old 09-11-2005, 07:55   #6 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 7,482
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
This is what I'm doing.
http://test.randomcolors.com/index.php

Oops, I'll have to check with my provider see if it is, Brown. Cheers
  Reply With Quote
Old 09-11-2005, 07:58   #7 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,340
Quote:
Originally Posted by emilpaun
This is what I'm doing.
http://test.randomcolors.com/index.php

Oops, I'll have to check with my provider see if it is, Brown. Cheers
Off-topic, but it's coming along. Looks like it has a lot of potential. Can't wait to see it completed.
  Reply With Quote
Old 09-11-2005, 07:59   #8 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 7,482
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
Thanks.
  Reply With Quote
Old 09-11-2005, 08:10   #9 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,205
probably because of the subdomain. try it without the /before project.

this works http://www.lifeofsmallbeer.co.uk/crap/emil/project/2
  Reply With Quote
Old 09-11-2005, 08:12   #10 (permalink)
stealthcow
knocking heads
 
stealthcow's Avatar
 
Join Date: Jul 2003
Location: London, UK
Posts: 1,945
make sure you set the <base href="" /> tag so that images etc will work
  Reply With Quote
Old 09-11-2005, 08:20   #11 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 7,482
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
thanks smallbeer, I will try that.
will do, stealthcow
  Reply With Quote
Old 09-11-2005, 08:40   #12 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 7,482
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
haaa, it works!!! I removed the first slash and it works
Code:
RewriteEngine On RewriteRule ^project/([0-9]+)$ index.php?project=$1 [L]
Thanks, all!! Now I have to look up the <base href thingie
  Reply With Quote
Old 09-11-2005, 08:41   #13 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 7,482
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
Oh yeah, and a handy little cheatsheet for those in need
http://www.ilovejackdaniels.com/chea...e-cheat-sheet/
  Reply With Quote
Old 09-11-2005, 09:19   #14 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,340
Quote:
Originally Posted by emilpaun
Oh yeah, and a handy little cheatsheet for those in need
http://www.ilovejackdaniels.com/chea...e-cheat-sheet/


Just what I needed.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8