Jump to content

Redirecting A Subfolder Via .htaccess

Recommended Posts

So I'm a total newbie when it comes to .htaccess files for the most part. I'm hoping someone can help me out here. Here's the issue:


What I'm trying to do is redirect all requests on http://www.cpadventures.com/forum to http://cpadventures.com/forum . I've read up on .htaccess but it's a little greek to me. I know that I should put the .htaccess file in the root of the forum folder. What I'm unsure about is the code to do that. Currently there is not a .htaccess file so it would be starting one from scratch. If anyone could help I would genuinely appreciate it!

Link to comment
Share on other sites

This should work. Place this in the .htaccess file in your public_html folder.


>Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^cpadventures\.com$ [NC]
RewriteRule ^(.*)$ http://cpadventures.com/$1 [R=301,L]

Link to comment
Share on other sites

Join the conversation

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

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...