How Can I Remove “public/index.php” in the Laravel Url generated? [duplicate]

Option 1: Use .htaccess If it isn’t already there, create an .htaccess file in the Laravel root directory. Create a .htaccess file your Laravel root directory if it does not exists already. (Normally it is under your public_html folder) Edit the .htaccess file so that it contains the following code: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule … Read more

Leverage browser caching, how on apache or .htaccess?

I took my chance to provide full .htaccess code to pass on Google PageSpeed Insight: Enable compression Leverage browser caching # Enable Compression <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/ AddOutputFilterByType DEFLATE application/x-font AddOutputFilterByType DEFLATE application/x-font-opentype AddOutputFilterByType DEFLATE application/x-font-otf AddOutputFilterByType DEFLATE application/x-font-truetype AddOutputFilterByType DEFLATE application/x-font-ttf AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/xhtml+xml … Read more

htaccess exclude one url from Basic Auth

Using SetEnvIf, you can create a variable when the request starts with some path, then use the Satisfy Any directive to avoid having to login. # set an environtment variable “noauth” if the request starts with “/callbacks/” SetEnvIf Request_URI ^/callbacks/ noauth=1 # the auth block AuthName “Please login.” AuthGroupFile /dev/null AuthType Basic AuthUserFile /xxx/.htpasswd # … Read more

.htaccess to redirect images

I am not sure this will solve the problem, but instead of modifying all the links you could use the BASE element in each page to define a base URI: From When present, the BASE element must appear in the HEAD section of an HTML document, before any element that refers to an external … Read more

How to manually generate pages in Nuxt router with a 404 page fallback for .htaccess

My way of handling this kind of issue while minimizing the API calls required are following those steps: generate a brand new Nuxt project install axios: yarn add -D axios add this to the nuxt.config.js file import axios from ‘axios’ export default { … generate: { routes: async () => { const users = await … Read more

.htaccess URL redirect

You could utilise mod_rewrite. RewriteEngine On RewriteRule ^blog/index\.php/weblog/rss_2\.0/$ /feed/ [R=302] That should forward the URL to /feed/ on the same domain as the request came in on. Once you’re happy it’s working you can change the 302 to 301.