How far to go with "Pretty URLs"?

My website uses “Pretty URLs” like this…

http://local.debbie/finance/articles/postage-meters-can-save-you-money

How far should I take this approach?

For consistency - or whatever - should I create mod_rewrites for simple URLs like this…

http://local.debbie/account/my-account.php

Sincerely,

Debbie

For purposes of consistency, it would make sense to use SEF URLs on everything, though you don’t necessarily need to. That’s what I generally do. My rewrite in htaccess sends requests to a file which then uses a switch statement to determine which resource is being requested then loads the appropriate include files. Adding SEF support for another page pretty much is a simple process requiring only an additional entry in the switch statement. The choice is yours whether or not to do it depending on your preferences.

Personally, I’d check for existing directory and file before redirecting on “pretty URIs.” The other “technique” would be to disallow the dot character (and /'s) in your redirections to eliminate filenames.

Regards

DK

I’m not understanding you?!

In this URL…

http://local.debbie/account/my-account.php

I have a script called “my-account.php” in a directory called “account” in my Web Root.

Debbie

DD,

RewriteCond {REQUEST_FILENAME} -d // checks for the request being a directory
RewriteCond {REQUEST_FILENAME} -f // checks for the request being a file

If both fail (in other words, use !-d and !-f to be true AND true), then do your redirection which will NOT affect any directory or file request.

Regards,

DK