Answer the question
In order to leave comments, you need to log in
RewriteRule in htaccess and relative file paths
Hello, I have a problem with the htaccess file on the site, there is a category
folder (located at the root) and the page.php page is located in it , respectively, this page is available at the url: site.com/category/page.php,
I want to change the url through htaccess , so that the page becomes available at site.com/contacts.html
Accordingly, I write the following in htaccess:
RewriteEngine On
RewriteBase /
RewriteRule ^contacts\.html$ category/page.php [NC,L]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question