mod_rewrite hide subdirectory in return url part2

Posted by user64790 on Server Fault See other posts from Server Fault or by user64790
Published on 2010-12-27T22:16:29Z Indexed on 2010/12/28 12:56 UTC
Read the original article Hit count: 185

Filed under:

Hi

I am having an issue trying to get my mod_rewrite configuration correctly

i have a site:

0.0.0.0/oldname/directories/index.php

I would like to rename "oldname" to "newname" resulting in:

0.0.0.0/newname/directories/index.php etc..

So when a user navigates to 0.0.0.0 my site will automatically send them to 0.0.0.0/oldname/index.php

I'm not planning on moving my content marketing have asked me to rename the site folder

I would like to mask the request of 0.0.0.0/oldname/index.php to 0.0.0.0/newname/index.php

Also if a user navigates from index.php to an link of say /oldname/project1/index.Php the final browsers returned URL will be /newname/project1.php without having to move or edit site links.

I also understand my hyperlinks will refer to /oldname but this is acceptable

any help would be highly appreciated.

Regards

© Server Fault or respective owner

Related posts about mod-rewrite