I have a website with 11 sub-domains.I have one main htaccess
file in the public_html
root folder that has the common shared traits like cache
This will make /thursday
work (and all the other days), put it in your main .htaccess
and in your sub-domain ones. It will also redirect your old URLs to the new ones.
It will only work if you are on Apache 2.4 or later. Let me know if you're not and I'll update the answer.
RewriteEngine on
# Redirect old URLs
RewriteCond %{QUERY_STRING} =day=mon
RewriteRule ^days/content\.php$ /monday [R=301,END]
RewriteCond %{QUERY_STRING} =day=tue
RewriteRule ^days/content\.php$ /tuesday [R=301,END]
RewriteCond %{QUERY_STRING} =day=wed
RewriteRule ^days/content\.php$ /wednesday [R=301,END]
RewriteCond %{QUERY_STRING} =day=thur
RewriteRule ^days/content\.php$ /thursday [R=301,END]
RewriteCond %{QUERY_STRING} =day=fri
RewriteRule ^days/content\.php$ /friday [R=301,END]
RewriteCond %{QUERY_STRING} =day=sat
RewriteRule ^days/content\.php$ /saturday [R=301,END]
RewriteCond %{QUERY_STRING} =day=sun
RewriteRule ^days/content\.php$ /sunday [R=301,END]
# Rewrite new URLs
RewriteRule ^monday$ days/content.php?day=mon [END]
RewriteRule ^tuesday$ days/content.php?day=tue [END]
RewriteRule ^wednesday$ days/content.php?day=wed [END]
RewriteRule ^thursday$ days/content.php?day=thur [END]
RewriteRule ^friday$ days/content.php?day=fri [END]
RewriteRule ^saturday$ days/content.php?day=sat [END]
RewriteRule ^sunday$ days/content.php?day=sun [END]
It is best to do the days individually since the script uses a short form and the new URL doesn't. You can change them if needed, or let me know if I'm missing something.