Okay, I'm a complete noob when it comes to editing .htaccess. I've never messed with it in all my years of building websites, and recently when trying to understand the process that goes into creating exactly what I'm looking for, it flies right over my head.
What I am trying to do is make a link domain.com/test/ load domain.com/test.php but keep /test/ instead of changing to /test.php
So I load domain.com/test/ and I see the page domain.com/test.php but the address bar shows domain.com/test/
If anyone could help me with this that would be amazing.
Enable mod_rewrite and .htaccess through httpd.conf and then put this code in your .htaccess under DOCUMENT_ROOT directory:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteRule ^test/?$ test.php [L,NC]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With