Page is a not externally linkable
lostdreamer - 10:21 am on Jul 16, 2010 (gmt 0)
Hi all,
I'm sure this has been asked in other forms, but I can't for the likes of me get this thing working after googling/trying for hours.
I have a bunch of URLs like this:
example.com/scripts/gateway.php?action=SomeStaticAction§ion=SomeDynamicSection
What I want is that all URLs will only be avaiable with clean URLs.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.html$ /scripts/gateway.php?action=SomeStaticAction§ion=$1 [NC]
This works fine to create nice URLs like example.com/SomeStaticAction.html
Now I also want the URL
'/scripts/gateway.php?action=SomeStaticAction§ion=SomeStaticAction' to 301 redirect to /SomeStaticAction.html
With everything I tried I either get no redirect or an infinite redirect because it will also redirect the querystring.
Can any Htaccess voodoo master help me with this?
Regards,
LostDreamer