Solved

rewrite rule inc port

Posted on 2008-11-03
4
151 Views
Last Modified: 2010-03-04
I need a rewrite rule that will rewrite the url to do the following:

if url http://domain.com:81/anything rewrite to http://domain.com:81/app/con/index.jsp

Also i dont really want to specify the domain/cname in the rule
0
Comment
Question by:willa666
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 43

Expert Comment

by:ravenpl
ID: 22869387
Into the .htaccess file

RewriteEngine On
RewriteCond %{SERVER_PORT} =81
RewriteRule ^anything.* http://domain.com:81/app/con/index.jsp [R=301,L]
0
 
LVL 1

Author Comment

by:willa666
ID: 22871702
Hi ravenpl

Is there a way of not specifing the "http://domain.com:81?

Ww
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 22871787
No, If You want other than the default port 80, You have to specify it.
0
 
LVL 27

Accepted Solution

by:
caterham_www earned 500 total points
ID: 22878542
At least my version is able to build a correct self-referencing URI with the correct port:
RewriteEngine On
RewriteCond %{SERVER_PORT} =81
RewriteRule ^anything /app/con/index.jsp [R=301,L]

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Suggested Courses

738 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