Forum Moderators: phranque

Message Too Old, No Replies

Detect rewrite rules in PHP

Looking for a way to detect the presences of rewrite rules.

         

billa

6:44 pm on Feb 8, 2007 (gmt 0)

10+ Year Member



I'm trying to detect (in PHP) the presence or lack thereof of a certain set of Rewrite rules via PHP. Does anyone know if there's a way to do this? Thanks in advance.

jdMorgan

10:41 pm on Feb 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You should be able to open the file, read it, and parse it, barring any file permissions problems.

Jim

billa

3:32 pm on Feb 9, 2007 (gmt 0)

10+ Year Member



Opening and parsing the file would work fine from the command line (assuming appropriate permissions, I'm on a Mac) and that certainly is an option. What I was looking for was a method of determining if rewrite rules were in effect from the browser. Is there something in the header that would indicate that the current URL started life as something else and has been rewritten?

Thanks for your reply, I appreciate it.

jdMorgan

3:42 pm on Feb 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, the internal operation of the server is not visible to any client -- assuming that it's coded properly and causes no errors.

Jim