Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 24th Nov 2010, 10:32 AM   #1
HyperActive Warrior
War Room Member
 
Darrel Hawes's Avatar
 
Join Date: 2006
Location: Spokane, WA
Posts: 416
Thanks: 221
Thanked 59 Times in 45 Posts
Blog Entries: 4
Default
Redirect install in subdirectory to root - how to?
Share on: 
fb share twitter share gplus share more share

Hope my title is descriptive enough.

I have a project management application I've installed in a subdirectory on one of my domains, i.e.

mydomain.com/projectmgt

In retrospect, perhaps I should have installed it in the root. At any rate, what I want to do is have the app appear as if it is installed in the root, so the user navigates to:

mydomain.com

to log in.

Is there a simple way to accomplish this? Please let me know if you need more info.

Thanks!

Darrel Hawes - Blog

Last edited on 24th Nov 2010 at 10:32 AM. Reason: deleted extraneous words :)
Darrel Hawes is offline  
Unread 24th Nov 2010, 10:53 AM   #2
VIP Warrior
War Room Member
 
SteveJohnson's Avatar
 
Join Date: 2007
Location: Caldwell, Idaho, USA.
Posts: 1,967
Thanks: 1,024
Thanked 2,043 Times in 1,183 Posts
Default
Re: Redirect install in subdirectory to root - how to?
Share on: 
fb share twitter share gplus share more share

This goes in your root-level .htaccess file:
Code:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/projectmgt
RewriteRule (.*) http://yourdomain.com$1 [R,L]
RewriteRule (.*) /projectmgt$1 [NC,L]
The above may or may not work - it depends on if URLs or URL paths are hardcoded in your script.

The easiest solution may be just to reinstall the application in the root folder.

The 2nd Amendment, 1789 - The Original Homeland Security.

Gun control means never having to say, "I missed you."
SteveJohnson is offline  
Unread 24th Nov 2010, 11:24 AM   #3
HyperActive Warrior
War Room Member
 
Darrel Hawes's Avatar
 
Join Date: 2006
Location: Spokane, WA
Posts: 416
Thanks: 221
Thanked 59 Times in 45 Posts
Blog Entries: 4
Default
Re: Redirect install in subdirectory to root - how to?
Share on: 
fb share twitter share gplus share more share

Hi Steven,

You're in my neck of the woods, sorta.

Thanks for your prompt reply.

I put your code into my .htaccess file (of course making the correct modifications for my actual domain), and here's what happens:

You tried to visit mydomain.comprojectmgt, which is not loading
I don't see what is wrong with the syntax to cause this. Any ideas?

Darrel Hawes - Blog
Darrel Hawes is offline  
Unread 24th Nov 2010, 11:49 AM   #4
KEY
The Chaotic Marketer
War Room Member
 
KEY's Avatar
 
Join Date: 2007
Location: Swamplands of NJ - USA
Posts: 278
Thanks: 158
Thanked 64 Times in 52 Posts
Default
Re: Redirect install in subdirectory to root - how to?
Share on: 
fb share twitter share gplus share more share

my personal thinking is that you are concerned over nothing...

why not just leave the domain free for use as a welcome, sales,
contact, info, etc page and simply have a link in the footer and in
the upper right:
"log in page"

this way you can tweak the content on the domain's index to your
hearts content without ever need to mess with the main script's
index page..?

KEY (eric)
KEY is offline  
Unread 24th Nov 2010, 01:47 PM   #5
Automation Specialist
War Room Member
 
caesargus's Avatar
 
Join Date: 2009
Location: Cary, NC
Posts: 153
Thanks: 31
Thanked 13 Times in 13 Posts
Blog Entries: 2
Default
Re: Redirect install in subdirectory to root - how to?
Share on: 
fb share twitter share gplus share more share

why couldn't you just move the files to the root directory? What you could do (if you have this level of access) is to move the files from the project directory and move it to the root, and create a symlink for projectdir and point it to the root directory ("ln -s projectdir . " - I might have the syntax flipped).

caesargus is offline  
Closed Thread


Bookmarks

Tags
install, redirect, root, subdirectory


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 12:12 AM.