Imagine a site with just three static pages - a home page and home pages for About and Introduction sections…
index.php
(Folder About) index.php
(Folder Topics) index.php
Now imagine an .htaccess file with rewrite rules that allow me to display dynamic pages in the About and Topics sections. However, a third rewrite rule allows me to display dynamic pages on the website’s home page. This is what it looks like:
RewriteRule ^About/([a-zA-Z0-9()_/-]+)/?$ About/index.php?bout=$1 [L]
RewriteRule ^Topics/([a-zA-Z0-9()_/-]+)/?$ Topics/index.php?topic=$1 [L]
RewriteRule ^/?([-a-zA-Z0-9_/]+)/?$ /index.php?area=$1 [L]
It works OK except for the section home pages (About and Topics). They work OK online, and they generally function OK locally, but the URL is http://MySite/Topics/?area=Topics instead of http://MySite/Topics
I also run into technical problems when working on my code; for example, it’s harder assigning values to these pages, largely because of the weird URL’s.
Is there some trick I can use to make that third rewrite rule ignore all my static pages and stop interfering with them?
Thanks.