Solved

Internal rewrite from root to subdirectory with htaccess

Posted on 2010-11-17
5
352 Views
Last Modified: 2012-05-10
I need to redirect our company website from the root folder to a subdirectory within the root. This problem is stemmed by the original code being done in flash. If you go to the website VAg Website and then go to the "On the Boards" tab at the bottom you will see the problem. I am assuming the programmer used absolute pathing and thus the problem. Below is the code that I have found to work.

My knowledge is limited with htaccess and would appreciate any help. Thanks so much.


RewriteEngine On

Options +FollowSymlinks

RewriteBase /

RewriteCond %{HTTP_HOST} .*vagarchitects.com

RewriteCond %{REQUEST_URI} !httpdocs/

RewriteRule ^(.*)$ httpdocs/$1 [L]

Open in new window

0
Comment
Question by:Tonydag125
  • 3
  • 2
5 Comments
 

Author Comment

by:Tonydag125
ID: 34158247
I also forgot to mention that I have a subdomain that need to be redirected, and is not working right now. The file structure is \subdomains\folder\httpdocs.

Thanks
0
 

Author Comment

by:Tonydag125
ID: 34159710
So I have been working with it a little more, and have come up with this code. It still does not fix the flash problem, but I do get subdomain funcitonality.

Thanks
RewriteEngine On

Options +FollowSymlinks

RewriteBase /

RewriteCond %{HTTP_HOST} ^vagarchitects.com$ [NC]

RewriteRule ^(.*)$ http://www.vagarchitects.com/$1 [L,R=301]

RewriteCond %{HTTP_HOST} ^www\.vagarchitects\.com [NC]

RewriteCond %{REQUEST_URI} !httpdocs/

RewriteRule ^(.*)$ httpdocs/$1 [L]

RewriteCond %{REQUEST_URI} ^/subdomains/vail/httpdocs/(.*)$ [NC]

RewriteRule ^/subdomains/vail/httpdocs/(.*)$ http://vail.vagarchitects.com/$1 [L,R=301]

Open in new window

0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 34181658
If the links are in a flash file, I don't think you can do it with HTACCESS.  Get the links out into normal HTML and you should have no problem.
0
 

Author Comment

by:Tonydag125
ID: 34184849
Unfortunately the problem is that we don't own the workable flash files as of right now. If anyone else can think of anything it would be appreciated.

Thanks
0
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 500 total points
ID: 34185008
Any site done like this entirely in flash presentations is a burden you don't want to carry.  

First search engines do NOT index the contents of flash files -- so this site does not exist to search engines because there is nothing for them to index.

It is a "show-off" site with no user interactivity at all -- therefore it gets no revenue stream -- a fancy presentation without some description of what the company can do, is UTTERLY USELESS.

Third, as you are finding out, this type of site is a "throw away" -- can't change anything, so it inflexible.

The quicker you dump it and go to a normal website the better.  You can't fix links in flash files.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Joomla Website Malfunction 9 92
Gulp not seeing Changes 4 36
Form Processing in PHP 11 31
app server have enough resources... 2 23
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now