clearing the browser cache will do it, *for your client*.
We use aggressive caching with ExpiresDefault “access plus 1 year”, but to circumvent that same agressive caching we use a global ‘serial number’ in all urls that mention cacheable files (images, js, css, etcetera), and part of our build process (Makefile) auto-updates it when some of that files changed, so /img/somefile.127.jpg got changed to /img/somefile.128.jpg in all generated html, and that some rewrite rules as
clearing the browser cache will do it, *for your client*.
We use aggressive caching with ExpiresDefault “access plus 1 year”, but to circumvent that same agressive caching we use a global ‘serial number’ in all urls that mention cacheable files (images, js, css, etcetera), and part of our build process (Makefile) auto-updates it when some of that files changed, so /img/somefile.127.jpg got changed to /img/somefile.128.jpg in all generated html, and that some rewrite rules as
what about when controller have same name as directory?
If the Dir DOES NOT exist - then the controller is called. So if you have a dir the same name as a controller - that controller will never be called. But this is the same problem with all .htaccess files anyway.
Like Bramme said, “I’d generally avoid stuff like this”. It’s the same thing as having two classes/functions called the same thing.
The default htaccess CI provided in the documentation works for me. I looked around and saw yours. Copied it verbatum and fixed up the path. Works fantastic :D
# If the file/dir is NOT real go to index RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /shop/index.php/$1 [QSA,L]
You can redirect from the index to a file (like index.php) in the same way you can forward site.com to site.com/shop/
Since google is not happy with redirection, i need to make it accessible…
...without redirection
I didn’t recomend a 301 or any other type of redirect because he stated that he wants the whole thing hidden from google/users eyes. In the same way we hide the “index.php/” with a default .htaccess.
I vote that you check to see if the query string includes the “shop/” part - then remove it if it does. Then either way load site.com/shop/index.php/