The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 17, 2019, 11:54:33 PM

Login with username, password and session length


Pages: [1] 2
  Print  
Author Topic: index.php - bear in mind im an idiot  (Read 5940 times)
SEOidiot
Journeyman
***
Offline Offline

Posts: 84


^ Hes a pint sized Ned Flanders


View Profile
« on: July 22, 2009, 07:14:18 AM »

hello all

im trying to create a site where i serve everything from index.php and control the urls therefore in the db

as you know im a mango eaten idiot and therefore i am stuck...

any help to get me started would be gratefully received

ta mutchly

paul
 Need Help Need Help Need Help Praise
Logged

<mango>Yummmmmmmmmmmmm</mango>
<pie>ewwwwwwwwwww</pie>
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #1 on: July 22, 2009, 07:36:16 AM »

edit your .htaccess with something like

Code:
RewriteEngine On
RewriteRule ^/(.*)$ /index.php?reqURI=$1 [L]

Or something like that.

Then you have a variable, reqURI that always contains the request URI, and you can use that to build your page.
Logged

hai
SEOidiot
Journeyman
***
Offline Offline

Posts: 84


^ Hes a pint sized Ned Flanders


View Profile
« Reply #2 on: July 22, 2009, 08:10:09 AM »

hey matey - thanks - ok issue is this -

have a products section with urls like /products.php?title=thisistheproduct
which im rewriting to /thisistheproduct.html

but ... i dont like using the long string as my query to the db as it will get messy and makes changing them harder..

so considering /thisistheproduct.html?id=10020200
but dont like that much either

wordpress uses index.php as the handler for all content, they dont reference postid in the urls but i cant believe they are using the page name as the variable in the select from the db ?

thanks
Logged

<mango>Yummmmmmmmmmmmm</mango>
<pie>ewwwwwwwwwww</pie>
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #3 on: July 22, 2009, 08:37:50 AM »

I think they use the page name and sanitize it.

By default it's like ?id=# or something, so that wouldn't surprise me.

Not that Wordpress is a paragon of intentional design or anything...
Logged

hai
SEOidiot
Journeyman
***
Offline Offline

Posts: 84


^ Hes a pint sized Ned Flanders


View Profile
« Reply #4 on: July 22, 2009, 08:59:47 AM »

yup i agree - sanitised text it is then (note the correct spelling)

thanks mr sloathe

paul
Logged

<mango>Yummmmmmmmmmmmm</mango>
<pie>ewwwwwwwwwww</pie>
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #5 on: July 22, 2009, 09:19:02 AM »

No prob.

It's only incorrect if you don't know how to pronounce it though.
Logged

hai
jammaster82
Lifer
*****
Offline Offline

Posts: 666


Thats craigs list for ya


View Profile
« Reply #6 on: July 22, 2009, 01:32:34 PM »

what exactly is this mango reference that keeps popping up?
Logged

The watched pot, never boils... But if you walk away from it , the soup burns.  What gives?
SEOidiot
Journeyman
***
Offline Offline

Posts: 84


^ Hes a pint sized Ned Flanders


View Profile
« Reply #7 on: July 22, 2009, 02:26:33 PM »

my fault sorry - im junior vice president of mango at the university of spam....
Logged

<mango>Yummmmmmmmmmmmm</mango>
<pie>ewwwwwwwwwww</pie>
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #8 on: July 22, 2009, 04:38:57 PM »

There is an eternal struggle that rages between mango and pie.

Choose a side, but choose wisely.

Also remember that mango sucks and pie rules.
Logged

hai
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #9 on: July 22, 2009, 05:10:59 PM »

It greatly determines your mindset.

I of course have to be difficult and the mediator that I am, and chose mango pie.
This causes great anger on both sides of the debate.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
SEOidiot
Journeyman
***
Offline Offline

Posts: 84


^ Hes a pint sized Ned Flanders


View Profile
« Reply #10 on: July 23, 2009, 12:18:13 AM »

You are dead to us both now.....
Logged

<mango>Yummmmmmmmmmmmm</mango>
<pie>ewwwwwwwwwww</pie>
Bompa
Administrator
Lifer
*****
Offline Offline

Posts: 564


Where does this show?


View Profile
« Reply #11 on: July 23, 2009, 05:54:23 AM »

what exactly is this mango reference that keeps popping up?

On another forum, in a galaxy far far away, a few years back, someone was
always saying something like:  "gotta eat my mango" or he was always talking
about his mangos, and cuz that forum is full of people that have no real life,
the "mango" phenomenon just caught on.

Wink

Logged

"The most beautiful and profound emotion we can experience is the sensation of the mystical..." - Albert Einstein
tomblack
Rookie
**
Offline Offline

Posts: 34


View Profile
« Reply #12 on: July 23, 2009, 06:43:32 AM »

Was this someone called MangoPirate by any chance?  Smiley
Logged
SEOidiot
Journeyman
***
Offline Offline

Posts: 84


^ Hes a pint sized Ned Flanders


View Profile
« Reply #13 on: July 23, 2009, 06:47:36 AM »

No.... he came later in some sort of vague attempt to steal the mango crown from its rightful owner  Don't make me...
Logged

<mango>Yummmmmmmmmmmmm</mango>
<pie>ewwwwwwwwwww</pie>
tomblack
Rookie
**
Offline Offline

Posts: 34


View Profile
« Reply #14 on: July 23, 2009, 07:01:56 AM »

It looks like the Kaption was/is the ambassador of pie.  ROFLMAO

I must have too much spare time because I'm trying to find the start of the Mango vs Pie war at the moment.  Undecided
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!