Jump to content

Recommended Posts

Posted

I installed my forum into a subdirectory, because it came out of the box that way. If I had known better, I would have installed it directly into public_html but it's too late now.

 

I want to completely hide the subdirectory from users (using .htaccess in public_html), because (a) I don't want anyone to know which forum I'm using, (:) the forum has a really dumb name that I want to hide, and © it just looks better.

 

I know I've done this before with other websites, but I can't find the magical code snippet after searching for over an hour. The best I've found so far has been this:

 

>RewriteCond %{REQUEST_URI} !subdir/
RewriteRule (.*) http://example.com/subdir/$1 [L]

This works...halfway. It redirects the front page to /subdir, but any links from the front page have /subdir in them. No good. I want /subdir to disappear completely from all URLs.

 

I also tried:

>DocumentRoot /subdir

but I just get 500 internal server error, "/home/username/public_html/.htaccess: DocumentRoot not allowed here"

Posted

Welcome to the forum, vellocet. :)

 

If you go in to your cpanel and click the "Backup wizard", you could download a compressed file of your "Home directory".

 

Then on your local computer, decompress it using winzip etc.

 

After that, ftp all files and folders under the sub directory to the new location "public_hrml".

 

If the forum software needs changes in a config.php etc to know where the forum files are, don´t forget to change those lines in it.

 

This procedure is a bit time consuming, but when done, visitors will only see example.net instead of example.net/folder name.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...