I know, I know, this has been discussed in a million places. Unfortuantely none of the solutions I’ve found in any of the other threads in this forum, Newism’s blog, Kevin Thompson’s post, or other places have solved my problem. Hopefully someone will have that one crucial nugget of advice.
So here it is…
We’re building a site that has 2 ‘flavors’ (winter and summer). To switch between the two flavors I’m using a query string of ?s=winter or ?s=summer. When the ?s= query string is present the page sets a cookie to store which flavor of the site you should be shown.
This works perfectly when you hit the homepage and attach the query string. For example, http://www.our-site.com/?s=winter works great.
But when I try to hit an inner page with the query string I get a 404 error. For example, http://www.our-site.com/things-to-do/?s=winter.
If I add index.php back into the URL (http://www.our-site.com/index.php/things-to-do/?s=winter) everything works fine again. So I’m pretty sure this is an .htaccess issue and the solution will be similar to Kevin Thompson and Leevi Graham’s solution. That is to add:
RewriteCond %{REQUEST_URI} ^/$ [NC]
RewriteRule (.*) /index.php?/home/index/&%{QUERY_STRING} [L]to my .htaccess file. Unfortunately it appears this only works for the homepage.
Does anyone know how I can make this work on inner pages as well?
Thanks!