MX Includes Forum :: RewriteRule with SSI Include
This thread was displayed: 0 times
Starting with 17th May 2007, Adobe Systems will stop offering support for any version of the discontinued InterAKT products. As a result, we will not answer to new support incidents starting with May 17th, 2007. Pending support incidents will still be followed in order to be closed. The product forums will remain open and be transformed in user-to-user forums. The general forums will be made read-only and not allow new posts or comments.
For more information about the affected products visit: www.interaktonline.com/Support/
Paul Tejera
11-30-2009 23:22:56 GMT +2
|
I am creating an SEO friendly page that works great as long as the final URL is still in the root directory.
http://www.domain.com/page.php?name=this-is-a-test -> http://www.domain.com/this-is-a-test
However, what I want is:
http://www.domain.com/page.php?name=this-is-a-test -> http://www.domain.com/page/this-is-a-test
I have a <base> element in the page and that works for the main stylesheet, but the included files (there are several) are still referencing the virtual directory it's now in (i.e. "/page/") and they don't have the correct paths.
Here is the code for the page. Any ideas how to get around this? I'd like to have separate pages for page.php (/page/seo-name), headline.php (/headline/seo-name) or headline.php (/headline/category/seo-name), giveaway (/giveaway/seo-name), etc.
.htaccess
Options +FollowSymLinks RewriteEngine onRewriteBase / # For Friendly URLs RewriteRule ^page/([^/\.]+)/?$ page.php?name=$1
page.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" c /> <title><?php echo $site_title; ?></title> <meta name="Keywords" c /> <meta name="Description" c /> <base href="<?php echo $base; ?>" /> <link href="styles.css" rel="stylesheet" type="text/css"/> </head> <body> <div id="wrapper-florets"> <div id="wrapper-main"> <?php mxi_includes_start("inc_headernav.php"); require(basename("inc_headernav.php")); &
View full message
|
|
|