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

  • SEARCH
  • Home
  • 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 7731183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:25:01+00:00 2026-06-01T06:25:01+00:00

We are running multiple domains through the same code and we want to save

  • 0

We are running multiple domains through the same code and we want to save their images in their respective folders. Here’s what we are doing.

/images/www.domain1.com/logo.jpg
/images/www.domain2.com/logo.jpg

now, what I want to know is, is this possible in htaccess that we rewrite the urls without user suspecting anything. This is what I want that

<img src="/images/logo.jpg" />

should internally become through htaccess

RewriteRule ^images/(.*)$ /images/{HTTP_HOST}/$1 [L,R=301]

But my question is,

  1. The above redirect continually loops
  2. Can I achieve the img effect without user or admin suspecting anything?

Sincerely,

Khuram

  • 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-06-01T06:25:02+00:00Added an answer on June 1, 2026 at 6:25 am

    You definitely should not use R flag if you don’t want to change URL in browser. However even without R flag your RewriteRule will loop infinitely and you will eventually get internal server error. Use RewriteRule like this:

    RewriteCond %{ENV:REDIRECT_STATUS} !200
    RewriteRule ^images/(.*)$ images/%{HTTP_HOST}/$1 [L,NC]
    

    Which is using a special internal variable called {ENV:REDIRECT_STATUS} that is set to 200 once RewriteRule rule is applied successfully.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running multiple content/design separate websites from same middleware and I want to use
We're looking into running multiple instances of Tomcat from the same copy of the
We are running one Magento install over multiple domains and are using a script
I'm currently running multiple redis instances on one box. Each have their own config,
Does running multiple Solr shards on a single machine improve performance? I would expect
Currently we are running multiple Sitecore projects. Whenever the projects go live we create
I am running multiple screens from one ssh connection, when I list all of
Background: I'm running multiple simulations on a set of data. For each session, I'm
I am running multiple reports and combining them into a single PDF file. For
Any one have an idea to share running multiple tomcats on single machine with

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.