Solved

modify .htaccess in order to redirect from http:///www.mydomain.com to https://171.25.36.24/claire

Posted on 2013-06-12
7
209 Views
Last Modified: 2013-06-12
Hi there,
I would like to modify my htaccess as you guest go to http://www.monexemple.com: he will be torwars to https://171.25.36.24/claire
Please help me,
Thank,
Regards,
Simlip
0
Comment
Question by:simlip
  • 4
  • 2
7 Comments
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 39241022
You can do this in PHP.  This is untested, but probably correct in principle.  You might want to add the header(301).

<?php header("Location: https://171.25.36.24/claire");

Open in new window

0
 
LVL 6

Expert Comment

by:Robert Saylor
ID: 39241041
RewriteEngine on
RewriteCond %{HTTP_HOST} ^monexemple\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.monexemple\.com$
RewriteRule ^/?$ "https\:\/\/171\.25\.36\.24\/claire" [R=301,L]

Open in new window

0
 
LVL 6

Expert Comment

by:Robert Saylor
ID: 39241047
Note: The user will get a SSL warning on an IP address when they are redirected. You should change that to a domain with SSL or remove the "s" in https if SSL is not required.
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Comment

by:simlip
ID: 39241105
Hi there,
Thank for you help
RewriteRule ^/?$ "https\:\/\/171\.25\.36\.24\/claire" [R=301,L] , multiple \ is it a bug ?
For the moment, we use ssl autosigned and we have a warning.
Regards
0
 
LVL 6

Expert Comment

by:Robert Saylor
ID: 39241130
no, these are escape strings not bugs. Have you tried it?
0
 
LVL 6

Accepted Solution

by:
Robert Saylor earned 500 total points
ID: 39241152
Here is another example:

My domain http://demo.customphpdesign.com will now redirect to the company's domain that I work for:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^demo\.customphpdesign\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.demo\.customphpdesign\.com$
RewriteRule ^/?$ "http\:\/\/www\.aggressor\.com\/" [R=301,L]

Open in new window

0
 

Author Comment

by:simlip
ID: 39241550
Thank,
It is working fine :)
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
windows 10 bash shell 4 35
php image upload 3 27
Converting SQL server date to string 3 16
Filter wordpress query 3 12
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

760 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

20 Experts available now in Live!

Get 1:1 Help Now