I’ve just inherited a load of code that is set up to reside in a website root folder unfortunately named “tract”.
Many of the files within that folder contain references to the path mywebsite.com/tract.
I’d like to rename the folder to “login” – but I don’t want to go through miles of code and change every reference to “tract” to “login” – if I can help it.
I’d like to know if there’s a way, using .htaccess, for me to be able to make links to mywebsite.com/login (e.g., mywebsite.com/login/register.php), and for that address to appear in the browser, but to be ‘actually’ pointing to mywebsite.com/tract (e.g., mywebsite.com/tract/register.php).
Is this possible?
I’m on a shared server and I only have access to .htaccess, not to other configuration files.
Enable mod_rewrite and .htaccess through
httpd.confand then put this code in your.htaccessunderDOCUMENT_ROOTdirectory: