Answer the question
In order to leave comments, you need to log in
How to shorten URL in .htaccess (using Mod-Rewrite)?
For example, the site itself is located here - domain.com/folder/index.php
How can I use mod-rewrite to type domain.com/index.php from the browser line?
Answer the question
In order to leave comments, you need to log in
Was just tinkering with this today. I'm not sure, but try (or correct if you suddenly made a mistake):
AddDefaultCharset UTF-8
RewriteEngine on
RewriteBase /
RewriteRule ^m/(.+) /files/$1 [L,QSA]
RewriteRule ^files/$ - [F,L]
In order for the site to open at the desired address, you need to put .htaccess not in the folder folder, but one level higher.
The htaccess rule is something like this:
RewriteCond %{REQUEST_URI} ^/index\.php
RewriteRule (.*) domain/index.php [L,QSA]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question