Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7178535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:56:26+00:00 2026-05-28T16:56:26+00:00

I have a domain at OVH that links to my EC2 instance like this:

  • 0

I have a domain at OVH that links to my EC2 instance like this:
http://www.mysite.com –> 12.34.56.78/folder/
So everytime I type “www.mysite.com” in my address bar I end up on my website but the URL has been replaced to “12.34.56.78/folder/”.

I’m currently trying to tweak a .htaccess file at the root of my server but it doesn’t seem to work…
Here is the content of the file:

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.mysite.com$
RewriteRule ^(.*)$ http://www.mysite.com/ [L]

Maybe I’m not looking at the right solution… Anyway if you can help me, I’ll be grateful!
Cheers,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:56:27+00:00Added an answer on May 28, 2026 at 4:56 pm

    You are missing a couple of things that I added below

    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www\.mysite\.com$ 
    #$1 will include the original URI in the redirect, 301 for permanent
    RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a domain class that looks like this: class Offerbyuser { Number offerPrice
I have domain www.mysite.com and subdomain api1.mysite.com. There (in domain) are several folders and
I have a domain with wildcard - *.mysite.com hosted on Server1 I am planning
I have a domain with host www.mydomainhost.com . Now i got another domain named
I would like to have domain.com using asp.net mvc2 technology and domain.com/blog would use
I have a domain name www.xyz.com and I want to make sure if someone
I have domain objects in FluentNHibernate that have Id's that are of type object
I have domain name for eq. 1) http://www.abc.com/search 2) http://go.abc.com/work I get only domain
I have domain like this: class Team { hasOne [leader: Person] hasMany [member: Person]
I have one domain (domain.com) with multiple sub-pages that have different sessions (by default)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.