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 7700879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:50:58+00:00 2026-05-31T22:50:58+00:00

My webserver is hosting many apps whose path looks like http://example.com/app1/ http://example.com/app2/ … I

  • 0

My webserver is hosting many apps whose path looks like

http://example.com/app1/
http://example.com/app2/ ...

I wanted to have temporary links to these apps which can be easily configured to be expired. So I have maintained mapping of temp to app url with expiry time in mysql.
In apache I have written rewrite rule as below

RewriteEngine On
RewriteMap linkmap prg:/home/http/a.php

RewriteCond $1 ^[^/]*$
RewriteRule /(.*) /$1/ [R=301,L]
RewriteRule /(.*) /${linkmap:$1} [P]

a.php maps temp urls to actual urls using mysql db. For example
temp1/xyz –> app1/xyz

Everything works fine until any page in app1 tries to redirect to another page. Since I am mapping urls based on mysql, I am not able to figure out how to make ProxyPassReference to read from mysql and replace redirect urls.
I have tried to specify ProxyPassReference rule manually and it works. But it is not possible to add all rules manually since I can dynamically create links through some interface by inserting links to mysql db.

Please help me to handle redirects.

  • 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-31T22:50:59+00:00Added an answer on May 31, 2026 at 10:50 pm

    I have figured it out how to do it.
    So from rewriterule I get target url map which I save i regular expression. Then I used ProxyPassReverse with interpolate flag.

    There is one problem here. My program to map url is in php. It works fine but If I see it after few days, it seems program is stopped and I get server error then needs to restart server.

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

Sidebar

Related Questions

I'm using ASP .NET rewriteModule to rewrite http://example.com to http://www.example.com . <section name=rewriteModule type=RewriteModule.RewriteModuleSectionHandler,
On my webserver i am hosting 2 applications and both applications use the same
We've got a webserver running IIS. We'd like to run maybe a shared blog
In my Apache webserver I put this: <Directory /var/www/MYDOMAIN.com/htdocs> SetHandler mod_python PythonHandler mod_python.publisher PythonDebug
I'm using Mobile Device Browser File ( http://mdbf.codeplex.com/ ) for my ASP.NET MVC 2
Hey guys I have my own webserver that is hosting a website that I
I just set up Mercurial on our main webserver, hosting repositories via hgwebdir.cgi. The
I have a web server hosting an HTTP chat application that works with long-polling.
Ok this may seem like a bit of a noob question but one many
I have many redirections within a VM webserver, which work when browsing the server

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.