I am making an attempt at my first mod_rewrite and having troubles.
It works, BUT it also ignores (?) my Header, Footer and Stylesheets.
Here is my code…
.htaccess
#PRETTY: articles/postage-meters-can-save-you-money
#UGLY: article.php?title=postage-meters-can-save-you-money
RewriteRule articles/([a-zA-Z0-9_-]+)$ article.php?title=$1
Here is part of my article.php file…
<body>
<div id="wrapper" class="clearfix">
<div id="inner">
<!-- Include BODY HEADER -->
<?php require_once(ROOT . 'components/body_header.inc.php'); ?>
<!-- MIDDLE COLUMN -->
<div id="middle_2col">
<div class="box_Content">
<!-- ARTICLE -->
<div id="article">
And here is my config.inc.php file…
<?php
define('ENVIRONMENT', 'development');
// define('ENVIRONMENT', 'production');
// File Root
define('ROOT', ENVIRONMENT === 'development'
? '/Users/user1/Documents/DEV/++htdocs/01_MyProject/'
: '/var/www/vhosts/MyWebsite.com/httpdocs/');
// Web Server Root
define('WEB_ROOT', ENVIRONMENT === 'development'
? 'http://localhost/01_MyProject/'
: 'http://www.MyWebsite.com/');
// Secure Web Server Root
define('SECURE_WEB_ROOT', ENVIRONMENT === 'development'
? 'http://localhost/01_MyProject/'
: 'https://www.MyWebsite.com/');
?>
What did I do wrong?
Debbie