Redirecting the homepage between two subdirectories, seasonally.
Permalink
I'm working with a particular website that has two completely different seasonal industries -- spring and fall -- and here's what I'm looking to do and so far have been unable to figure out:
Right now, each season has its' own template and full content laid out similar to the following, each with sub-folders and/or pages underneath it:
http://www.example.com/springindustry...
http://www.example.com/fallindustry...
I would really, really love to not have a landing page.
What I'm looking to do is during spring and the summer months, have "/" 302-redirect to "/springindustry", and the opposite in fall/winter. I'm okay with making the switch manually.
I'm guessing this will be .htaccess, but with Pretty URL's enabled, this complicates things all the more. I'm *not* looking to transparently rewrite the URL; I want it to change in the address bar.
Also, on that note, if anyone has any verified thoughts on SEO as far as not really having any content on the main domain (/), I'd like to hear what you have to say. Really, though, if this is possible, this is the cleanest and best way to do it as far as their needs.
Any information at all would be greatly appreciated. Thank you for taking the time to read this.
Right now, each season has its' own template and full content laid out similar to the following, each with sub-folders and/or pages underneath it:
http://www.example.com/springindustry...
http://www.example.com/fallindustry...
I would really, really love to not have a landing page.
What I'm looking to do is during spring and the summer months, have "/" 302-redirect to "/springindustry", and the opposite in fall/winter. I'm okay with making the switch manually.
I'm guessing this will be .htaccess, but with Pretty URL's enabled, this complicates things all the more. I'm *not* looking to transparently rewrite the URL; I want it to change in the address bar.
Also, on that note, if anyone has any verified thoughts on SEO as far as not really having any content on the main domain (/), I'd like to hear what you have to say. Really, though, if this is possible, this is the cleanest and best way to do it as far as their needs.
Any information at all would be greatly appreciated. Thank you for taking the time to read this.
I looked into a few of the page redirects, but wasn't entirely impressed. I don't remember exactly why.
Here's what I ended up doing:
In .htaccess:
DirectoryIndex sitehome.php
This kept c5's index.php intact and untouched, but allowed me to intercept requests for /.
In sitehome.php:
<? header("Location:http://www.example.com/spring",TRUE,302);... ?>
This one line would be changed twice a year between Spring and Winter.
Now, if someone visitshttp://www.example.com they are 302'd instantly tohttp://www.example.com/season.
The only thing I'm not sure on are the SEO consequences, and I've seen people take both sides of the issue. I know that lots of bigger sites, like xbox.com, yahoomail.com, etc. use something along these lines.
Any comments on the matter appreciated.
Here's what I ended up doing:
In .htaccess:
DirectoryIndex sitehome.php
This kept c5's index.php intact and untouched, but allowed me to intercept requests for /.
In sitehome.php:
<? header("Location:http://www.example.com/spring",TRUE,302);... ?>
This one line would be changed twice a year between Spring and Winter.
Now, if someone visitshttp://www.example.com they are 302'd instantly tohttp://www.example.com/season.
The only thing I'm not sure on are the SEO consequences, and I've seen people take both sides of the issue. I know that lots of bigger sites, like xbox.com, yahoomail.com, etc. use something along these lines.
Any comments on the matter appreciated.
Add it to the homepage and select the page to redirect to.