Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

.htaccess redirection issues

Posted on 2014-12-06
3
Medium Priority
?
121 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 15

Accepted Solution

by:
Edwin Hoffer earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

705 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