Member Avatar

diafol

Hi all, I have a phpbb forum that I had to move to a subdirectory (/forum/). We've been going for 8 years so have a lot of stuff indexed on Google etc.

Is there a painless way of using .htaccess to send all requests to the subdirectory. The root directory will be empty save for the forum subdirectory and its contents.

I have searched various forums, including this one and the Apache site, but am totally out of my depth here - regex kills me!

Any advice would be very welcome.

Hello,

You should be able to simply change the document root in the apache configuration to the new location.

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /www/docs/dummy-host.example.com
    ServerName dummy-host.example.com
    ErrorLog logs/dummy-host.example.com-error_log
    CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /www/docs/dummy-host.example.com/forum
    ServerName dummy-host.example.com
    ErrorLog logs/dummy-host.example.com-error_log
    CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
Member Avatar

diafol

Unfortunately, I'm hosted on a shared server.

Member Avatar

diafol

Seems I've got to change to document root in the conf file. Pah! Never mind, job for the host.

Thanks rch. Problem solved.