The "contents" folder simply contains .html files that are included as the content
Okay here's the problem:
I have a "subfolder" in the "contents" folder with additional .html files that I need to access Now I'm trying to redirect like this: domain.com/subfolder/about to domain.com/index.php?page=subfolder/about
This works:
RewriteRule ^([^/.]+/[^/.]+)/?$ index.php?page=$1
But now I can't access the subfolder from: domain.com/subfolder/ because there is a 'page' variable
Necessary Knowledge
My .htaccess file redirects like this:
domain.com/about to domain.com/index.php?page=about
The "page" variable is used in a php include:
The "contents" folder simply contains .html files that are included as the content
Okay here's the problem:
I have a "subfolder" in the "contents" folder with additional .html files that I need to access
Now I'm trying to redirect like this:
domain.com/subfolder/about to domain.com/index.php?page=subfolder/about
This works:
But now I can't access the subfolder from: domain.com/subfolder/ because there is a 'page' variable
<?php $page = $_GET['page']; if(!$page) { $page = 'index'; } ?>Any thoughts, ideas, or help would be greatly appreciated.
Thanks in advance
http://www.htaccesseditor.com/en.shtml#a_errorPage
Great little resource, but it didn't have RewriteRule's. It only had Redirect and I'd like to not have to write a Redirect for each url.
Thanks for the tip