Solved

.htaccess redirection issues

Posted on 2014-12-06
3
118 Views
Last Modified: 2015-02-07
.htaccess goals:
1) When someone goes to mysite.com/abc it should reroute to http://info.mysite.com/abc
2) Otherwise go to mysite.com/test
And in all cases keep all name value pairs for GETs

What I have isn't working - when I put in mysite.com/abc it redirects to http://www.mysite.com/info.mysite.com/abc instead of http://info.mysite.com/abc. Can you tell me how to fix what I have:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite\.com\/abc$
RewriteRule ^/?$ "http\:\/\/info\.mysite\.com\/abc" [R=301,L]

RewriteCond %{HTTP_HOST} ^mysite\.com$
RewriteCond %{HTTP_HOST} !^info\.mysite\.com$
RewriteRule ^/?$ "http\:\/\/mysite\.com\/test" [R=301,L]

# Use PHP5.4 Single php.ini as default
AddHandler application/x-httpd-php54s .php
0
Comment
Question by:LauraLaura1
3 Comments
 
LVL 14

Accepted Solution

by:
Edwin Hoffer earned 500 total points
ID: 40484643
Use the below code in your .htaccess file:

Redirect 301 /abc http://info.mysite.com/abc

Open in new window


Update /abc to your folder and update http://info.mysite.com/abc to the website where you want to redirect the abc folder.

Hope it will work for you

Thanks
Edwin
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 40595448
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

821 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