Category : .htaccess

I need the following URL structure. https://url.com/info/cars/audi/fastest/1 https://url.com/info/planes/airbus/cheapest/1 This is the current .htaccess rule: RewriteRule ^info/(.*)/(.*)/(.*)/(.*)$ /info.php?category=$1&sub_category=$2&sorting=$3&page=$4 I need parameters 3 and 4 to be optional. Currently, if I leave the page or sub-category empty, it returns a 404 error. But I don’t want to pass the page parameter for the first page, for example. ..

Read more

Related to a previous Question: .htaccess – Recursively mapping slashes to underscores The code that was listed as the "full solution" worked for 12 months. Then stopped working. The .htaccess code wasn’t changed either – just to make things harder. The Question Can anyone help me achieve The Desired Outcome? The Desired Outcome Take https ..

Read more

I need to auto open page in chrome. This code opens in mobile chrome without any problems. RedirectMatch 301 id/(.*)$ intent://example.com/cancel.php?id=$1#Intent;scheme=https;package=com.android.chrome;end But need this work only if user is on Android. So I have tried this but it doesnt redirect. RewriteCond %{HTTP_USER_AGENT} (android) [NC] RedirectMatch 301 ^id/(.*)$ intent://example.com/cancel.php?id=$1#Intent;scheme=https;package=com.android.chrome;end The problem is, this url scheme won’t ..

Read more

I want to hide /public from all Laravel URLs. As always, I did this in .htaccess in the root directory: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(.*)$ public/$1 [L] </IfModule> I have this route for example: Route::get(‘/stock/{ticker}’, ‘[email protected]’)->name(‘stock.analysis’); If I link to the route, when I hover over the link, I see the correct URL: /stock/MSFT ..

Read more