Sever settings question

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
jabbaonthedais
Forum Contributor
Posts: 127
Joined: Wed Aug 18, 2004 12:08 pm

Sever settings question

Post by jabbaonthedais »

Hi, I'm wondering how I could do this, and if it would be too much trouble. I've seen some sites do this but I don't know anything about their server so no clue what they use to make it happen.

Instead of having urls with php variables like this:
http://www.mywebsite.com/folder1/index. ... &popup=yes

I would like to have something like this:
http://www.mywebsite.com/folder1/90191/popup/


I want a url similar to that to basically load up /folder1/index.php with those variables. With what I want to use it for, I couldn't create all the folders I would need to make it work properly.

I'm wondering if anyone knows how I could do this... or any way to let people link to my site with lots of variables, yet more attractive than the standard stuff. Is there anything in SSH to let you break down the 404 to do this instead of going to one page for all your 'not found' requests?

Thanks! :D

edit: Actually, why couldn't I make my 404 page a php file that broke the url down and made all the sub directories variables? I could see if a variable was correct and include a file, and if it wasn't, include a normal 404 error page.
User avatar
trukfixer
Forum Contributor
Posts: 174
Joined: Fri May 21, 2004 3:14 pm
Location: Miami, Florida, USA

Post by trukfixer »

most of this can be done with .htaccess directves on an apache server rather simply .. it does cause a performance hit ..

another option , I believe is you can modify the delimiter for the query_string (in your apache config) or just simply do index.php?stuff=/this/that/the-other/stuff/ and explode on the /

me, I just use .htaccess directives.. (you need mod_rewrite loaded for apache)

Code: Select all

ErrorDocument 404 /index.php
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+) /index.php/$1 [L]
that's just a simple example.. there's better methods, I'm sure.. I just havent ever bothered really, cause I deal very little in using $_GET at all...
Post Reply