Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 24, 2012, 10:09:10 AM

Pages: [1]   Go Down
  Print  
Author Topic: Redirect addon domain to sub folder, show original URL  (Read 1675 times)
slkra2
Newbie
*
Offline Offline

Posts: 3


« on: August 14, 2008, 10:58:17 AM »

I've been trying many things I've found in redirect posts I've read, but I am still not having any luck with exactly what I'm trying to do.

I have an addon domain:   domain.info
I have b2evolution installed in:  domain.info/folder
I want to forward domain.info TO domain.info/folder, but I still want to see domain.info in the address bar.

How do I write the code in .htaccess to do this?

Thanks for any help!
Logged
RichardRay
Support
Spaceship Navigator
*****
Offline Offline

Posts: 90


« Reply #1 on: August 14, 2008, 09:32:07 PM »

Hi there,

Here is a link to information on accomplishing the redirect you are attempting to do:
http://www.widexl.com/tutorials/mod_rewrite.html#redirect_domain_dir

Based on the information you provided, it should look something like this in your .htaccess file:

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.info$
RewriteCond %{REQUEST_URI} !^/folder/
RewriteRule ^(.*)$ /folder/$1

Or if the 'folder' you are referring to is in the public_html folder, you can simply add the domain to your account as an addon domain, using the following details in cPanel > Addon domains:

Domain name: domain.info
Username/subdomain name/folder: folder
Password: (password of your choice)

Hope this helps.
Logged

Lunarpages Web Hosting
Lunarpages Affiliate Program
FAQs | Tutorials | LP Glossary

Telephone: 1-714-521-8150
24 hour Network Status Line: 1-562-697-8106
Fax: 1-714-521-8195
slkra2
Newbie
*
Offline Offline

Posts: 3


« Reply #2 on: August 15, 2008, 06:58:20 AM »

Definitely helps! Thank you much!
Logged
FloraL
Support
Trekkie
*****
Offline Offline

Posts: 12


« Reply #3 on: August 15, 2008, 07:00:00 AM »

If you require further assistance, please feel free to let us know. We'll be happy to help!
Logged

TremenDesk - A Better Hosted Help Desk Solution!
Pages: [1]   Go Up
  Print  
 
Jump to: