Mod Rewrite Exceptions
Posted: Wed May 03, 2006 10:59 pm
feyd | Please use
Shoud I make an if ! contact.php { ... } ? Im not really sure how this script is working.
thanks
feyd | Please use
Code: Select all
,Code: Select all
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??) --Code: Select all
function replace_for_mod_rewrite(&$s)
{
$urlin =
array(
"'(?<!/).php'"
);
$urlout = array(
"$1.html"
);
$s = preg_replace($urlin, $urlout, $s);
return $s;
}Shoud I make an if ! contact.php { ... } ? Im not really sure how this script is working.
thanks
feyd | Please use
Code: Select all
,Code: Select all
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]