Answer the question
In order to leave comments, you need to log in
What is the correct way to write a RewriteRule for .htaccess?
I'm not sure if this is actually possible, but the problem is this:
There is a website, let's say example.com
There is a certain module that works on example.com/foo/index.php
Accordingly, there are various URLs like example.com /foo/bar/far , which should all be handled by example.com/foo/index.php
You have the following .htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
<a href="/bar/far">Test link</a>
Answer the question
In order to leave comments, you need to log in
You understand that a link like /bar/far has nothing to do with the foo module, right? It leads to the root of the site. In any case, you need to change links.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question