We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, By changing one line, functionality can be added to use the plugin with different domains.
In the file src/Cache.php on line 198:
- $segments = explode('/', ltrim($request->getPathInfo(), '/')); + $segments = explode('/', ltrim($request->getHost() . $request->getPathInfo(), '/'));
- $segments = explode('/', ltrim($request->getPathInfo(), '/'));
+ $segments = explode('/', ltrim($request->getHost() . $request->getPathInfo(), '/'));
It has been tested on Laravel 7 and it works for me. Is it a good idea? Is there something I'm missing?
The text was updated successfully, but these errors were encountered:
I also forgot to add the .htaccess file.
# Serve Cached Page If Available... RewriteCond %{REQUEST_URI} ^/?$ RewriteCond %{DOCUMENT_ROOT}/page-cache/%{HTTP_HOST}/pc__index__pc.html -f RewriteRule .? page-cache/%{HTTP_HOST}/pc__index__pc.html [L] RewriteCond %{DOCUMENT_ROOT}/page-cache/%{HTTP_HOST}%{REQUEST_URI}.html -f RewriteRule . page-cache/%{HTTP_HOST}%{REQUEST_URI}.html [L] RewriteCond %{DOCUMENT_ROOT}/page-cache/%{HTTP_HOST}%{REQUEST_URI}.json -f RewriteRule . page-cache/%{HTTP_HOST}%{REQUEST_URI}.json [L]
Sorry, something went wrong.
This would break all existing caches.
If you want this in your project, you can easily extend the built-in Cache class, and overwrite that method 👍
Cache
You can also do it setting a different path depending on domain at boot on AppServiceProvider
Look here #74 (comment)
No branches or pull requests
Hello,
By changing one line, functionality can be added to use the plugin with different domains.
In the file src/Cache.php on line 198:
- $segments = explode('/', ltrim($request->getPathInfo(), '/'));
+ $segments = explode('/', ltrim($request->getHost() . $request->getPathInfo(), '/'));
It has been tested on Laravel 7 and it works for me. Is it a good idea? Is there something I'm missing?
The text was updated successfully, but these errors were encountered: