72,640 questions
Score of -1
1 answer
56 views
Issue with the Laravel Public URL
RewriteEngine On
# Block direct access to /public/* from the browser
RewriteCond %{THE_REQUEST} \s/+public[/\s?] [NC]
RewriteRule ^ - [F,L]
# Redirect everything else internally to /public folder
...
Score of 0
0 answers
76 views
aaPanel url rewrite stopped working after updating panel
Today I updated my aaPanel software and now my url rewrite is no longer working.
I had this:
rewriteengine on
rewritecond %{HTTP_HOST} ^www.domain.com/$ [OR]
rewritecond %{HTTP_HOST} ^domain.com$
...
Best practices
1
vote
1
replies
66
views
how to configure access to wordpress blog with url '/blog' in surrounding shop
My customer uses a gambio shop with a wordpress installation inside in the folder /blog. Wordpress should be callable by url www.example.com/blog.
In the moment I cannot call the route www.example.com/...
Score of -3
1 answer
229 views
How to redirect root home "/" to defined directory index page in browser bar [closed]
We have website.com/ which has a home page specified as /home.html. We need any browser visit to / to therefore redirect and present /home.html.
I.e. in the client's browser address bar:
www.website....
Score of 0
0 answers
129 views
How to implement CSP without 'unsafe-inline' in WordPress (Elementor) without breaking site?
I am working on securing a WordPress website that uses Elementor and several plugins.
I have implemented a Content Security Policy (CSP) via .htaccess like this:
Header always set Content-Security-...
Tooling
0
votes
1
replies
68
views
How to generate safe .htaccess rewrite rules for multiple redirects?
I’m working on configuring .htaccess rewrite rules where I need to handle multiple redirects like:
HTTP to HTTPS
Removing www
Managing trailing slashes
Adding custom 301 redirects
When I combine ...
Score of 3
1 answer
218 views
Angular 20 app shows blank page on first load after deploying with --base-href /new/ and Service Worker — works after refresh (only in Production)
I built an Angular 20 app with:
"build:prod:with-base": "ng build --configuration production --output-hashing=all --base-href /new/ --deploy-url /new/ && node ./build/post-build....
Score of 2
1 answer
83 views
Handle all HTTPS redirects in top level .htaccess, when subdir .htaccess exists. .htaccess nesting problem [closed]
Dir structure:
/www/.htaccess
/www/api/.htaccess
/www/api/flight.php
File content:
#/www/.htaccess
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}/%{REQUEST_URI} [L,R=...
Score of 2
1 answer
94 views
How to substitute %{REQUEST_FILENAME} with only the domain relevant address? [closed]
We have a .htaccess file on a domain that had moved servers from an Apache/2.4.66 (cPanel) server to an Apache/2.4.62 (AlmaLinux) server:
Within one website with .htaccess we have the following:
...
Score of -4
1 answer
275 views
Authenticate into Apache via PHP (htaccess login done by PHP) [closed]
I want to allow directory index (list directory in browser) but only for users logged in via php. Users not logged in should not have any access.
Is it possible to log in to apache (AuthType Basic, ...
Score of 0
0 answers
80 views
Add-to-cart attack bot detection returning the wrong status code
My website is hosted on a litespeed server. Litespeed has a preset environmental variable "blockbot". I put the following code in my .htaccess file. It is supposed to mark any bot that ...
Score of 0
0 answers
97 views
Varnish Error 503 VCL failed when url path ends with %
My website gives a Error 503 VCL failed when url ends with %
I have tried to disable cache, and also tried redirect, in .htaccess but without success.
Here's my current .htaccess-configuration:
<...
Score of 1
1 answer
121 views
Being redirect to project base home after .htaccess change
I´m facing an issue with my public/.htaccess file after making a change and the reverting it.
The change RewriteRule .*\.php.* / [R=301,L] to redirect malicious requests, /cmd.php and after that ...
Score of 4
1 answer
100 views
Transforming project into multilingual using .htaccess
I have a task to transform a project that currently works in a single language into a multilingual project.
The current project URL structure looks like this:
www.site.com
www.site.com/contact.php
www....
Score of 1
1 answer
132 views
Dynamic WordPress .htaccess subdomains does not work
I am trying to load custom dynamic subdomains to load as specific subfolders on my WordPress site.
Example:
apple.example.com should load the content from example.com/subfolder/apple
apple.example....