I am stuck in here with htaccess. I've searched and tried many tutorials and problem solutions but couldn't achieve what I want.
I want to remove folder names from the website link. My htaccess file is in the root directory i.e "testing"
What my link looks like:
http://localhost/testing/sub/test.php
What I want:
http://localhost/test.php
Following is my htaccess
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule /(.*) /testing/sub/$1 [L]
Use this line in your root .htaccess
RewriteRule ^test.php$ /testing/sub/test.php
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