How to redirect one route from a domain some where else in apacheApache, Wildcard SSL and mod_rewriteHow to...

Why was the small council so happy for Tyrion to become the Master of Coin?

A function which translates a sentence to title-case

Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)

Email Account under attack (really) - anything I can do?

A Journey Through Space and Time

Why is the design of haulage companies so “special”?

The magic money tree problem

DOS, create pipe for stdin/stdout of command.com(or 4dos.com) in C or Batch?

Is Social Media Science Fiction?

What is the meaning of "of trouble" in the following sentence?

Why don't electron-positron collisions release infinite energy?

Extreme, but not acceptable situation and I can't start the work tomorrow morning

declaring a variable twice in IIFE

Can Medicine checks be used, with decent rolls, to completely mitigate the risk of death from ongoing damage?

How do we improve the relationship with a client software team that performs poorly and is becoming less collaborative?

Copenhagen passport control - US citizen

What is the offset in a seaplane's hull?

How does one intimidate enemies without having the capacity for violence?

Is it possible to make sharp wind that can cut stuff from afar?

Infinite past with a beginning?

What defenses are there against being summoned by the Gate spell?

A newer friend of my brother's gave him a load of baseball cards that are supposedly extremely valuable. Is this a scam?

Why are 150k or 200k jobs considered good when there are 300k+ births a month?

How to type dʒ symbol (IPA) on Mac?



How to redirect one route from a domain some where else in apache


Apache, Wildcard SSL and mod_rewriteHow to 301 redirect a single file or directory on a GoDaddy shared Windows hosting plan?What is the correct method to log the original domain in the apache log files after a redirect 301?apache2 defaultsite redirect but not virtual hostApache httpd does not implement updates to a 301 redirect configurationIf else condition Apache 301 redirectApache persists on not wanting to redirect to httpsRestrict myphpadmin to listen on specific ethernet adapterSSL Certificate, Redirect, No-www done right (apache)?RewriteMap not working, nothing is rewritten (Apache 2.4)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I have what, from my searching so far, seems to be a slightly different problem with site redirections than the norm. I need to redirect one particular route from one domain to another on a different port.



So far I've tried a simple 301 Redirect and a rewrite to no avail.



The code looks like



<VirtualHost *:80>                                                                                                                      
ServerName blah.hardsoft.nexus.blah2.blah3.au/phpmyadmin
RewriteEngine on
RedirectMatch "^blah.*nexus.*/phpmyadmin$" "http://10.1.140.1:8080/phpmyadmin"
#RedirectMatch ".*nexus.*" "http://10.1.140.1:8080/phpmyadmin"

#Redirect 301 / http://10.1.140.1:8080/phpmyadmin
</VirtualHost>

<VirtualHost 10.1.140.1:8080>
ServerName phpmyadmin
DocumentRoot /var/www-8080
</VirtualHost>


As you can see I've tried a couple of redirect matches (one very broad) and a 301 redirect, but in all cases what I end up with is it being redirected to



 10.1.140.1/phpmyadmin


without the port being appended (at least I think that's whats happening).



Any idea how I should be doing this? Is it even possible?









share





























    0















    I have what, from my searching so far, seems to be a slightly different problem with site redirections than the norm. I need to redirect one particular route from one domain to another on a different port.



    So far I've tried a simple 301 Redirect and a rewrite to no avail.



    The code looks like



    <VirtualHost *:80>                                                                                                                      
    ServerName blah.hardsoft.nexus.blah2.blah3.au/phpmyadmin
    RewriteEngine on
    RedirectMatch "^blah.*nexus.*/phpmyadmin$" "http://10.1.140.1:8080/phpmyadmin"
    #RedirectMatch ".*nexus.*" "http://10.1.140.1:8080/phpmyadmin"

    #Redirect 301 / http://10.1.140.1:8080/phpmyadmin
    </VirtualHost>

    <VirtualHost 10.1.140.1:8080>
    ServerName phpmyadmin
    DocumentRoot /var/www-8080
    </VirtualHost>


    As you can see I've tried a couple of redirect matches (one very broad) and a 301 redirect, but in all cases what I end up with is it being redirected to



     10.1.140.1/phpmyadmin


    without the port being appended (at least I think that's whats happening).



    Any idea how I should be doing this? Is it even possible?









    share

























      0












      0








      0








      I have what, from my searching so far, seems to be a slightly different problem with site redirections than the norm. I need to redirect one particular route from one domain to another on a different port.



      So far I've tried a simple 301 Redirect and a rewrite to no avail.



      The code looks like



      <VirtualHost *:80>                                                                                                                      
      ServerName blah.hardsoft.nexus.blah2.blah3.au/phpmyadmin
      RewriteEngine on
      RedirectMatch "^blah.*nexus.*/phpmyadmin$" "http://10.1.140.1:8080/phpmyadmin"
      #RedirectMatch ".*nexus.*" "http://10.1.140.1:8080/phpmyadmin"

      #Redirect 301 / http://10.1.140.1:8080/phpmyadmin
      </VirtualHost>

      <VirtualHost 10.1.140.1:8080>
      ServerName phpmyadmin
      DocumentRoot /var/www-8080
      </VirtualHost>


      As you can see I've tried a couple of redirect matches (one very broad) and a 301 redirect, but in all cases what I end up with is it being redirected to



       10.1.140.1/phpmyadmin


      without the port being appended (at least I think that's whats happening).



      Any idea how I should be doing this? Is it even possible?









      share














      I have what, from my searching so far, seems to be a slightly different problem with site redirections than the norm. I need to redirect one particular route from one domain to another on a different port.



      So far I've tried a simple 301 Redirect and a rewrite to no avail.



      The code looks like



      <VirtualHost *:80>                                                                                                                      
      ServerName blah.hardsoft.nexus.blah2.blah3.au/phpmyadmin
      RewriteEngine on
      RedirectMatch "^blah.*nexus.*/phpmyadmin$" "http://10.1.140.1:8080/phpmyadmin"
      #RedirectMatch ".*nexus.*" "http://10.1.140.1:8080/phpmyadmin"

      #Redirect 301 / http://10.1.140.1:8080/phpmyadmin
      </VirtualHost>

      <VirtualHost 10.1.140.1:8080>
      ServerName phpmyadmin
      DocumentRoot /var/www-8080
      </VirtualHost>


      As you can see I've tried a couple of redirect matches (one very broad) and a 301 redirect, but in all cases what I end up with is it being redirected to



       10.1.140.1/phpmyadmin


      without the port being appended (at least I think that's whats happening).



      Any idea how I should be doing this? Is it even possible?







      mod-rewrite apache2 301-redirect





      share












      share










      share



      share










      asked 1 min ago









      Peter NUnnPeter NUnn

      2901622




      2901622






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "2"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f961957%2fhow-to-redirect-one-route-from-a-domain-some-where-else-in-apache%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Server Fault!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f961957%2fhow-to-redirect-one-route-from-a-domain-some-where-else-in-apache%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

          Список ссавців Італії Природоохоронні статуси | Список |...

          Українські прізвища Зміст Історичні відомості |...