Discuss: Manage Your Content With PHP
by Christopher Robbins
- Editorial Comments
22 Security and stuff...
I’m wondering if perhaps the author of the article could update the article and source files so as to reduce the security risk. I’m itching to try this out, but I don’t want to create a security risk, and I don’t know enough about PHP (read: nothing) to work the various fixes listed here in myself.
Thanks!
posted at 10:21 pm on August 9, 2002 by Jan Van Tol
23 Re: Security and stuff...
Ditto to the post by Jan Van Tol. I too was eager to try this and even understood it all up until I came to the forum and read the discussions about the security issues.
I’m still in the beginning stages of switching all my sites over to xhtml and making them adher to web standards. I know very little php. I did enjoy the article and understood it for the most part. But after reading the discussions, I guess my dream of being able to do this easily really means taking hours, days, and weeks to dig deeper into php. Ugh.
posted at 10:55 pm on August 9, 2002 by Debbie
24 Extending Idea
Hi everyone,
I have implemented the strategy discussed in this article. Right now I can access pages using http://slowview.at/index.php?page=pagename. Right now I’m also trying to add functionality discussed in http://www.alistapart.com/stories/urls/2.html which would allow me to link to pages simply by http://slowview.at/pagename. URL cloaking if you wish. Unfortunatelly that article doesn’t allow to post comments, so I’m seeking for help in here. :)
The article above does give you a generic example of how to achieve cloaking effect, but when I adopt it to my case it doesn’t seem to work. This is what I use:
RewriteEngine On
RewriteRule ^([0-9]+) index.php?page=$1
I’m concerned about ([0-9]+) part. It doesn’t look right. Will it work for any strings or only numerical ones?
Please advise,
Alex
posted at 02:15 pm on August 11, 2002 by Alex
25 mod rewrite fun
Alex,
You’re right, the ([0-9]+) part is only for numerical strings… It says to look for one or more numbers, and remember their value as $1. So what you need is something like:
RewriteRule ^(.+) index.php?page=$1
However, that will probably suck up all the other pages on your site and rewrite their URLs. I see two probable options — instead of taking anything after the domain name and adding that onto index.php?page= (like my first suggestion), make sure it doesn’t have a slash or a period in it:
RewriteRule ([/\.]+) index.php?page=$1
This will make sure URLs like slowview.at/contact.html still work out if you need them to. Otherwise, add a prefix ‘directory’, like slowview.at/content/pagename:
RewriteRule ^content/(.+) index.php?page=$1
I think that’s all I’ve got. Anybody else?
Nate
posted at 07:14 pm on August 11, 2002 by nate
26 Yesterday..
This is so old fashioned :) Try XML/XSL for template driven websites.
posted at 11:50 pm on August 11, 2002 by
27 php/apache/mysql installers
Ron C, here are some complete installations of php/apache/mysql which (are supposed to) work right out of the box – these are great for testing your php without having to find a host, or uploading updates if you do have a host. The only one of these I have used is phptriad, which works perfectly on the 3 machines I installed it on.
PHPTriad – http://sourceforge.net/projects/phptriad
FoxServ – http://sourceforge.net/projects/foxserv
PHPDev – http://www.firepages.com.au/dev4.htm
posted at 09:38 am on August 12, 2002 by insin
28 Just a note...to say what a great article!
What a great article! I enjoyed monkeying (is that a word?) with the PHP code, and think your writing style is right on! Bravo!
posted at 06:28 pm on August 12, 2002 by Tom
29 Implement PHP quickly on Windows
In response to Ron C…
It is simple to test out PHP on Windows by using PHPTriad. It includes Apache, PHP, and mySQL. The install is very painless and the app is good for testing things out. Note this isn’t a long term solution, but it makes it very easy to check out PHP and see whether it’s worth investing more time in or not. The flexibility that the language offers in database interaction has been the true reward for me in converting applications to PHP.
Download and info available at http://sourceforge.net/projects/phptriad
posted at 04:51 pm on August 16, 2002 by Mike Bauerly
30 where?
how do I declare the different pages? do I save ‘babeuf.html’ or ‘babeuf.php’? I dont understand where or how the actual content comes in to play?
posted at 09:27 am on August 17, 2002 by ry
Discussion Closed
New comments are not being accepted, but you are welcome to explore what people said before we closed the door.
Got something to say?
Discuss this article. We reserve the right to delete flames, trolls, and wood nymphs.
Create a new account or sign in below if you’d like to leave a comment.
Subscribe to this article's comments: RSS (what’s this?)






21 Re: Ironically
That’s why you do a lot of things which look like, but aren’t quite MVC in PHP. :)
There are scripts such as Rael Dornfest’s Bloxsom which handle the the problem in the manner Joseph Ryan describes. Can you recommend other lightweight tools?
posted at 08:23 pm on August 9, 2002 by Bill Humphries