PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
The site I'm working on is changing all .php to .html. First of all, why? Second, I am trying to have a page "contact.php" NOT changed to html. How do I create an exception? Below is the code in the footer. (Im not sure I understand why this exists in addition to the REWRITE stuff in the .htaccess file??) --
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
[quote="[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1"][b]1.[/b] Select the correct board for your query. Take some time to read the guidelines in the sticky topic.[/quote]
It would appear the code you have is designed to alter in-page links proactively by having the script call it with the source code being sent to the user. As for creating an exception, you could use preg_replace_callback() with a function that knows which files to make exceptions for.
thanks feyd for your reply. sorry for breaking so many guidlines on my first post...
I'm checking out preg_replace_callback but I'm a little intimidated thinking I'm going to have to learn regular expressions to create an exception here. ...
The callback you specify can perform the check based on data sent in the match results. If done write, you shouldn't need more regex or more complicated regex than pretty much what you have already.
Update:: I couldn't figure this one out, so I just created a contact.html page. Duh. Anyway, I tried some if (...) statements, but they didnt work. Really curious what I'm missing here. I don't know if its because I dont know anything about regexpressions or if im missing something simpler...