Rewrite www.domain.com/test.php to www.domain.com/test/

Ok, I'm a complete noob when it comes to editing .htaccess. I have never come across this for all my years of creating websites, and recently, trying to understand the process that consists in creating exactly what I am looking for, it flies right above my head.

  • What I'm trying to do is make a link domain.com/test/load domain.com/test.php, but save / test / instead of changing to /test.php

  • So, I load domain.com/test/ and I see the domain.com/test.php page, but domain.com/test/ is displayed in the address bar

If anyone could help me with this, that would be amazing.

+3
source share
1 answer

mod_rewrite .htaccess httpd.conf, .htaccess DOCUMENT_ROOT:

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

RewriteRule ^test/?$ test.php [L,NC]
+2

All Articles