Post by Garret H » Sun Aug 05, 2018 2:49 am

Hello,

Forgive me but I've searched and searched and every "solution" I've found hasn't worked.

I was running 1.5.6.4 and did a side-by-side clean install of 3.0.2.0 in subfolder mysite.com/oc3. Everything is working well, now I just want to point my site so that when someone goes to mysite.com it goes to mysite.com/oc3 but not have the /oc3 visible. I know I need to edit the .htaccess file but I can't figure out what I need to put in there. Can someone please help?

Thanks!

New member

Posts

Joined
Wed Jan 25, 2012 12:20 am

Post by rjcalifornia » Sun Aug 05, 2018 8:18 am

Garret H wrote:
Sun Aug 05, 2018 2:49 am
Hello,

Forgive me but I've searched and searched and every "solution" I've found hasn't worked.

I was running 1.5.6.4 and did a side-by-side clean install of 3.0.2.0 in subfolder mysite.com/oc3. Everything is working well, now I just want to point my site so that when someone goes to mysite.com it goes to mysite.com/oc3 but not have the /oc3 visible. I know I need to edit the .htaccess file but I can't figure out what I need to put in there. Can someone please help?

Thanks!
Try this:

RewriteEngine On

# Map http://www.example.com to /oc3
RewriteRule ^$ /oc3/ [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/oc3/
RewriteRule ^(.*)$ /oc3/$1

# Add trailing slash to directories within oc3
# This does not expose the internal URL.
RewriteCond %{SCRIPT_FILENAME} -d
RewriteRule ^oc3/(.*[^/])$ http://www.example.com/$1/ [R=301]

Image
A2 Hosting features: Shared Turbo Boost, Managed Warp 1, Unmanaged Hyper 1, and Warp 2 Turbo


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide
Who is online

Users browsing this forum: No registered users and 13 guests