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

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

Sincerely,

Debbie

cheesedude
—
2012-11-23T13:09:53Z —
#2

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.

dklynn
—
2012-11-25T23:34:06Z —
#3

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

DoubleDee
—
2012-11-26T03:01:46Z —
#4

dklynn said:

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

dklynn
—
2012-11-26T07:11:58Z —
#5

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.