enchen
02-14-06, 08:49 AM
I'm including various files through index.php in a way that most pages have a URl like this:
index.php?choice=$var1&Some_ID=$var2&Some_Title=$var3
Below is a copy of my .htaccess which is working, but it doesn't look pretty, and soner or later I suspect there will be some issues...
RewriteEngine on
RewriteRule a(.*)/(.*)\.html$ ?choice=article&aid=$1&pt=$2
RewriteRule accommodation\.html$ ?choice=accommodation
RewriteRule more(.*)/(.*)\.html$ ?choice=accommodation&bid=$1&pt=$2
RewriteRule booking\.html$ ?choice=booking
RewriteRule booking/(.*)\.html$ ?choice=booking&action=$1
RewriteRule contact\.html$ ?choice=contact
RewriteRule contact/(.*)\.html$ ?choice=contact&action=$1
RewriteRule dloads\.html$ ?choice=dloads
RewriteRule d(.*)/(.*)\.html$ ?choice=dloads&did=$1&pt=$2
RewriteRule no-dice\.html$ ?choice=no-dice
RewriteRule poll-(.*)\.html$ ?choice=polls&action=$1
RewriteRule s(.*)/(.*)\.html$ ?choice=section&sid=$1&pt=$2
RewriteRule search\.html$ ?choice=search
RewriteRule sitemap\.html$ ?choice=sitemap
RewriteRule (.*)/tellafriend\.html$ ?choice=tellafriend&pt=$1
RewriteRule weblinks\.html$ ?choice=weblinks
RewriteRule w(.*)/(.*)\.html$ ?choice=weblinks&wid=$1&pt=$2
If someone knows how I could make this more logical and cleaner I would be the happiest man on earth today (as in today)... ;)
I suppose a RewriteCond or 2 would make a hugh difference, but as I'm not an Apache mod_rewrite expert this is way out of my league :(
index.php?choice=$var1&Some_ID=$var2&Some_Title=$var3
Below is a copy of my .htaccess which is working, but it doesn't look pretty, and soner or later I suspect there will be some issues...
RewriteEngine on
RewriteRule a(.*)/(.*)\.html$ ?choice=article&aid=$1&pt=$2
RewriteRule accommodation\.html$ ?choice=accommodation
RewriteRule more(.*)/(.*)\.html$ ?choice=accommodation&bid=$1&pt=$2
RewriteRule booking\.html$ ?choice=booking
RewriteRule booking/(.*)\.html$ ?choice=booking&action=$1
RewriteRule contact\.html$ ?choice=contact
RewriteRule contact/(.*)\.html$ ?choice=contact&action=$1
RewriteRule dloads\.html$ ?choice=dloads
RewriteRule d(.*)/(.*)\.html$ ?choice=dloads&did=$1&pt=$2
RewriteRule no-dice\.html$ ?choice=no-dice
RewriteRule poll-(.*)\.html$ ?choice=polls&action=$1
RewriteRule s(.*)/(.*)\.html$ ?choice=section&sid=$1&pt=$2
RewriteRule search\.html$ ?choice=search
RewriteRule sitemap\.html$ ?choice=sitemap
RewriteRule (.*)/tellafriend\.html$ ?choice=tellafriend&pt=$1
RewriteRule weblinks\.html$ ?choice=weblinks
RewriteRule w(.*)/(.*)\.html$ ?choice=weblinks&wid=$1&pt=$2
If someone knows how I could make this more logical and cleaner I would be the happiest man on earth today (as in today)... ;)
I suppose a RewriteCond or 2 would make a hugh difference, but as I'm not an Apache mod_rewrite expert this is way out of my league :(