Please note that I have installed dynamic web pages (PHP) in the directory *public_html/old/* in order to create the web site www.example.com. Actually I have created a PHPBB forum and thus the URL of a topic is:

http:// www.example.com/old/viewtopic.php

or the URL of the index file is:

http:// www.example.com/old/index.php

What I would like to do is to change the name of directory “old” to “new”. I have been consulted that it can be done by editing the file .htaccess that exists in the directory *public_html* and write inside:

Redirect permanent /old http://example.com/new

Could you please let me know if is this correct or should I write www.example.com instead of example.com. Moreover could you please let me know whether this effects any aspect of my web site?

In addition I have been informed that if I change the name of the directory then it may break my web site (since I will have changed the path or location of the script) unless I configure it to work correctly. Could you please let me know what should the configurations be?

1 Answer 1


From the phpBB documentation if you move the directory in which it is installed you may need to change the SCRIPT PATH as defined in the configuration file. It looks like you will only need to do this if you also have the FORCE SERVER URL SETTINGS option set, otherwise phpBB adapts to whatever directory you have it in.

Your redirect code looks correct. As you note, you may want to add a www into it. If your preferred URL is with the "www", then use it in the redirect.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.