0

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

1 Answer 1

0

You want a redirect rule. This is a 301 rule which will cause search engines like Google to perm change the url they use.

RewriteRule ^oldname/index.php$ http://0.0.0.0/newname/index.php [R=301,L]
2
  • So would I need a rule with variables to cover all subpages for example
    – user64790
    Dec 28, 2010 at 16:06
  • Give me an example
    – Mike
    Dec 28, 2010 at 16:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .