Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-20-2010, 03:31 PM   #1
Senior Member
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,466
Blog Entries: 6

Rep: Reputation: 51
Need help with apache Rewrite Rule?

Web Server: apache
Machine: RHEL 5.2
I'm setting up a rewrite rule which has the following scenario:

I have a url : which needs to be pointed to index.html file which is in document root.Whereas, in the index.html file i'm redirecting to a new index.jsp file which is available in the same document too.

So, the index.html contents are :
<meta http-equiv="refresh" content="0;URL=">
Can you anyone provide me the redirect/rewrite rule which i can specify in apache which would directly take me the index.jsp file?

currently, i have added the following entries :
RewriteCond %{HTTP_HOST} ^devmob\.stariance\.com [NC]
RewriteRule [PT,NC,L]
I have also setup a virtual host which can run on port 82 for this url.
<VirtualHost *:82>
DocumentRoot /data/apache/htdocs/mobapp/
#DirectoryIndex /mobapp/jsp
DirectoryIndex index.html
JkMount /*  node1
JkMount /hottopics* node1
JkMount /mobapp* node1
Include conf/Rewrite.conf

Pls Suggest.
Old 01-21-2010, 08:12 AM   #2
Senior Member
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Why do a rewrite rule ? ... just change to :

DirectoryIndex index.jsp
<edit>just realised you'd set up vhost on a non-standard port.. do you need to ?</edit>


Last edited by kbp; 01-21-2010 at 08:14 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Apache Rewrite Rule jon_k Linux - Software 1 06-10-2009 03:09 AM
apache rewrite rule to lighttpd's. error!!! gavin2u Linux - Server 0 08-12-2008 01:18 AM
Subdomains with Apache 2.2.3 - vhost or rewrite rule? Serapis Linux - Server 8 01-25-2008 05:28 AM
Apache rewrite rule help kinetik Linux - Software 1 11-05-2007 12:18 PM
Help me make this rewrite rule in Apache ganninu Linux - General 8 01-07-2004 09:30 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:57 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration