kfordham281 Posted April 9, 2008 Share Posted April 9, 2008 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! Quote Link to comment Share on other sites More sharing options...
TCH-Thomas Posted April 9, 2008 Share Posted April 9, 2008 Instead of going this route with creating the htaccess file, have you tried the redirect option in cpanel? Quote Link to comment Share on other sites More sharing options...
kfordham281 Posted April 9, 2008 Author Share Posted April 9, 2008 I didn't know that was there, but I just tried. I get the following error when trying to do what I need: You cannot redirect forum to http://cpadventures.com/forum as will cause a redirection loop because /home/site_path/public_html/forum is at the same place as /home/site_path/public_html/forum. Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted April 9, 2008 Share Posted April 9, 2008 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] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.