Click to See Complete Forum and Search --> : Your opinion to MOD or not-rewrite?


leatherback
02-13-2007, 05:46 PM
Hey Guys,

Slightly off-topic in every thread to be honest, so here something for you..

I would love to hear your opinion on mod rewrite in general, and on my problem specific:

About 2, 3 years ago I built a CMS which I have running on a few websites. I am in a complete CMS overhaul

The old version used to write an actual page to the server whenever a user created one, as the client for which I originally built it wanted that. I had a version that worked after that project, was lazy and stuck with it...

So.. Now I am moving hosting providers for 2 sites, and in the process I am recoding parts of the CMS. Obvious choice now.. Should I move away from the file-writing (Which is a hassle, as you may imagine, with control for existing files, adding file ID values to the files yadieyadie).

If I do this, I want to use clean URLs while keeping the option for users to create their own folders etc. And not to forget.. The old links need to be resolved properly.

Question: In your opinion: Am I opening a big can of wurms if I go to a mod-rewrite solution? Or is it reasonably easy to move the site from one to another? (I have no experience in using it, so it is a bit hard for me to judge how easy it would be to make a general ruleset, which would allow users to create their own folders (Would I need to store fake folders in the database?), and allow old links to be resolved).

Cheers guys,

Jelle.

piersk
02-14-2007, 06:13 AM
I've had a play around with mod_rewrite and I found it pretty good. Obviously you're putting a bit more load onto the server since it has to look up to find the target of the redirection and also the db time to get the dynamic data, but other than that it's pretty good and very useful.

I found that looking at the wordpress .htaccess file helped me a lot in learning about the whole mod_rewrite bit.

Roger Ramjet
02-14-2007, 03:07 PM
Your biggest problem will be the hosting: most shared servers rely on mod_rewrite and they don't let you use it to protect themselves from users who get it wrong. You may be able to implement it in a sub directory but don't expect to be able to do a mod_rewite in your document root.

Apart from that it is an excellent choice which is why I've tried to use it and been so disapointed when I could not.

(just set up a trial on a new host with mysql 5 cos I want stored procs etc - and just found out I don't have create view privileges :mad: ??? Waiting to hear back from tech support why not :queasy: so I don't hold out much hope for mod rewrite either - but I'll let you know)

leatherback
02-14-2007, 06:28 PM
OK, I have taken a plunge, and ran -obviously- into trouble. In the general help forum I will post a question in a bit.

Roger Ramjet
02-15-2007, 01:13 AM
I posted a longish reply there if anyone finds this thread and needs some help.