Forum Moderators: phranque
page.php?cal=myvalue971&getdate=20061123
or
page.php?getdate=20061123&cal=myvalue971
to automatically redirect to
/page/20061123/myvalue971/
But I'm having a really difficult time doing it. Below is what I have so far.
RewriteCond %{query_string} &?getdate=(.*)&? [NC]
RewriteCond %{query_string} &?cal=(.*)&? [NC] [N]
RewriteRule ^page.php [{...] SERVER_NAME}/%1/%1/? [R] [L]
Most of it are bits and pieces I've found different places. I understand the regular expression part, but I'm not sure if I really understand all of the Apache specific options (e.g. query_string, [NC] [N] etc)
The above code I've created when given the URL
[myserver.com...]
(BTW the myvalue971 is does not always end in numbers)
Doesn't do anything and acts like its not even a match. Any ideas? or references to good resources? Thanks!
Options +FollowSymLinks
RewriteEngine on
#
RewriteCond %{QUERY_STRING}&%{QUERY_STRING} &?getdate=([^&]*)&([^&]*&)*cal=([^&]*)
RewriteRule ^page\.php$ http://{SERVER_NAME}/page/%1/%3/? [R=301,L]
Jim