{"action":"opened","issue":{"url":"https://api.github.com/repos/Automattic/wp-super-cache/issues/19","labels_url":"https://api.github.com/repos/Automattic/wp-super-cache/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-super-cache/issues/19/comments","events_url":"https://api.github.com/repos/Automattic/wp-super-cache/issues/19/events","html_url":"https://github.com/Automattic/wp-super-cache/issues/19","id":53974693,"number":19,"title":"hardcoded 1&1 workaround in wp-cache.php breaks rewrite rules for other setups","user":{"login":"iamwebrocker","id":1223080,"avatar_url":"https://avatars.githubusercontent.com/u/1223080?v=3","gravatar_id":"","url":"https://api.github.com/users/iamwebrocker","html_url":"https://github.com/iamwebrocker","followers_url":"https://api.github.com/users/iamwebrocker/followers","following_url":"https://api.github.com/users/iamwebrocker/following{/other_user}","gists_url":"https://api.github.com/users/iamwebrocker/gists{/gist_id}","starred_url":"https://api.github.com/users/iamwebrocker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamwebrocker/subscriptions","organizations_url":"https://api.github.com/users/iamwebrocker/orgs","repos_url":"https://api.github.com/users/iamwebrocker/repos","events_url":"https://api.github.com/users/iamwebrocker/events{/privacy}","received_events_url":"https://api.github.com/users/iamwebrocker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-10T23:00:51Z","updated_at":"2015-01-10T23:00:51Z","closed_at":null,"body":"Hi,\r\nin wp-cache.php, line 2779ff, there's a work around for a problem with german provider \"1&1\"s server config:\r\n\r\n\t$content_dir_root = $document_root;\r\n\tif ( strpos( $document_root, '/kunden/' ) === 0 ) {\r\n\t\t// http://wordpress.org/support/topic/plugin-wp-super-cache-how-to-get-mod_rewrite-working-on-1and1-shared-hosting?replies=1\r\n\t\t// On 1and1, PHP's directory structure starts with '/homepages'. The\r\n\t\t// Apache directory structure has an extra '/kunden' before it.\r\n\t\t// Also 1and1 does not support the %{DOCUMENT_ROOT} variable in\r\n\t\t// .htaccess files.\r\n\t\t// This prevents the $inst_root from being calculated correctly and\r\n\t\t// means that the $apache_root is wrong.\r\n\t\t//\r\n\t\t// e.g. This is an example of how Apache and PHP see the directory\r\n\t\t// structure on\t1and1:\r\n\t\t// Apache: /kunden/homepages/xx/dxxxxxxxx/htdocs/site1/index.html\r\n\t\t// PHP:           /homepages/xx/dxxxxxxxx/htdocs/site1/index.html\r\n\t\t// Here we fix up the paths to make mode_rewrite work on 1and1 shared hosting.\r\n\t\t$content_dir_root = substr( $content_dir_root, 7 );\r\n\t\t$apache_root = $document_root;\r\n\t}\r\n\r\nIf was wondering what was going on with my installation and why WPSC had an additional (and wrong) \"kunden\" added to the rewrite cond. As it turns out, the above breaks on my setup, b/c the apache server root path on germans \"domainfactory\" hosting also starts with \"/kunden/...\", but has none of the weird 1&1 thing - so here the path is fine by itself, but now the work around above produces a wrong path:\r\n\r\nrealpath:\r\n  /kunden/XXXXXX/webseiten/mydomain/htdocs/blog/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz -f\r\n\r\nrewritecond:\r\n  /kunden/XXXXXX/webseiten/mydomain/htdocs/kunden/blog/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz -f\r\n\r\nas you can see, there is a second \"kunden\" inserted."}}