Questions tagged [mod-rewrite]
URL rewriting module for the Apache web server. It is commonly used for so-called `pretty URLs` , but also provides the power and flexibility to perform various request handling tasks beyond simple substitutions.
mod-rewrite
33,148
questions
0
votes
1
answer
19
views
Compare two backreferences in RewriteCond
This is the old URI pattern /release-(\w+)/(\w+)/(.*), where first and second regex pattern are always the same, with the following examples:
/release-foo/foo/(.*)
/release-bar/bar/(.*)
etc
They are ...
1
vote
1
answer
137
views
typo3 permissions issue
Since yesterday (nothing was changed) I Got the following error when I want to edit a page or add content.
Forbidden
You don't have permission to access this resource.
I'm logged in as backend admin ...
1
vote
0
answers
19
views
Fixing Apache HTTPD Configuration for Blocking Specific Headers and Custom 403 Error Page
I'm facing an issue in Apache httpd. In the littpd.conf. Inside the rewrite.mod I am blocking requests which have these 3 headers
X-HTTP-METHOD
X-HTTP-Method-Override
X-METHOD-OVERRIDE
And the ...
0
votes
1
answer
39
views
Laravel project inside a legacy one
I'm trying to make a laravel project work inside a legacy site while we work on modernizing the entire code base. I've been able to make it work in my dev computer using valet creating a custom valet ...
2
votes
1
answer
23
views
Redirect default language parameter to root with htaccess
I have been looking for a solution, but only found one similar case without an answer (unfortunately). Although the implementation is working, I am still missing one crucial aspect.
I am running a ...
0
votes
1
answer
40
views
Redirect All URI Requests, Including Folders, to index.php Using .htaccess?
I am trying to configure my .htaccess file to redirect all URI requests, including folders, to index.php. Here is the structure of my root directory:
app
admin
public
index.php
.htaccess
My goal is ...
0
votes
1
answer
35
views
Is there a way to hide a part of a URL from the address bar while keeping it in $_GET?
I have a website, say, https://example.com, that runs on LAMP stack (Apache2 rewrite_mod activated) and that I would like to make multilingual.
I don’t want my URLs to contain the language/locale, ...
0
votes
0
answers
56
views
Best way to deny .php in URLs while keeping access to those files through other URLs
Here are two examples of what I would like to do:
Example 1: I have a services.php file. I would like it to be accessible on www.example.com/services. Furthermore, I would like www.example.com/...
0
votes
0
answers
46
views
Session drops out when using mod_rewrite and not going to index.php
So I am using mod_rewrite.
I call a session create file on every page load. It creates a session with a couple of variables.
When I go to a subfolder, ie: https://domainname.com/merchants/ it also ...
0
votes
0
answers
13
views
Invisibly redirect one domain to another via .htaccess
I'm trying to find a way to redirect my subdomain, let's call it one.example.com, to my other subdomain's subpage two.example.com/one but without the user noticing they are being redirected.
I tried ...
0
votes
0
answers
32
views
HTACCESS RewriteCond not working after server change
I recently moved from a common shared cPanel hosting to a dedicated server. Everything works with normal WordPress installations except a custom website performing a targeted HTACCESS rewrite.
...
0
votes
0
answers
20
views
RewriteRule issue after 5th rule
I am stuck in a viard issue.
I have the below set of RewriteRule configured in httpd.conf for one of my domain.
----
<Directory "/var/www/html/test/">
RewriteEngine On
...
0
votes
0
answers
17
views
Authorizing Access to apache http application using mod_rewrite rules
i am a bit new to apache web server and mod_rewrite .
We are hosting a cgi application on apache web server We are trying to add an authorization check to verify whether the user has access to the ...
0
votes
0
answers
17
views
Error Too many redirects when changed from Apache to Nginx
I have migrated my website from Apache to Nginx. I had issue after migration.
Current .htaccess configuration:
RewriteBase /
RewriteRule ^home$ index.php
RewriteRule ^file/? do.php?id= [QSA]
...
0
votes
0
answers
27
views
Apache mod_rewrite How to strip slash off document root AND all URIs
I have apache-2.4.59 on fedora40 and trying to strip any trailing slash(es) from the root and any other URIs using RewriteCond/RewriteRule in my vhost config. I've tried a dozen different combinations ...