Re: redirecting to index.jsp using rewrite rules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



DirectoryIndex index.jsp ?


From: Charan <charan314@xxxxxxxxx>
To: users@xxxxxxxxxxxxxxxx
Sent: Mon, May 3, 2010 9:46:51 PM
Subject: redirecting to index.jsp using rewrite rules

Hi,

I'm using the below rule to redirect to index.jsp if user doesn't add index.jsp to the url. Is it possible to have one rule instead of the below repeating rule.

RewriteEngine On
RewriteCond %{REQUEST_URI} /en/[a-z]*/$
RewriteCond %{REQUEST_URI} !\.jsp$
RewriteRule ^(.*)$ $1index.jsp [R=301,L]
RewriteCond %{REQUEST_URI} /en/[a-z]*/[a-z]*_?[a-z]*/$
RewriteCond %{REQUEST_URI} !\.jsp$
RewriteRule ^(.*)$ $1index.jsp [R=301,L]


Thanks,
Charan


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux