Welcome Guest, Not a member yet? Register   Sign In
Caching when mod-rewrite enabled
#1

[eluser]Unknown[/eluser]
I have CI setup to remove index.php via an .htaccess file and have put the index variable in config.php to "". This might just be my setup thats spooking, but i'd guess it goes for all that have rewritten their index.php file to ""

When using the page cache function in the output library i noticed all the md5 hashes didnt match up vs my own generated hashes, so i looked in the Output library - _write_cache() function:

Code:
$uri =    $CI->config->item('base_url').
                $CI->config->item('index_page').
                $CI->uri->uri_string();

        $cache_path .= md5($uri);
I echoed the $uri out and noticed that it generated: http://www.mysite.com//en/gallery instead of http://www.mysite.com/en/gallery, which you would expect. This makes it kind of hard to generate hashes.

I suppose it goes for everywhere the URI is generated in the same way.




Theme © iAndrew 2016 - Forum software by © MyBB