Aman
Aman

Reputation: 23

htaccess is partially working on ip server domain

i have a ip server say 23.43.53.23 and a cms is a root folder my index.jsp and second.jsp is there

now when i apply short changes in .htaccess file like :

RewriteEngine on
<IfModule dir_module>
    DirectoryIndex second.jsp
</IfModule>

then's it works...

but when i put something rewrite rule like

RewriteEngine on
    RewriteRule ^second/([^/]*)/?(.*)$ second.jsp?name=$1&page=$2

and pass this value

http://XX.XX.XX.XX:8080/cms/second.jsp?name=en&page=ro

then it is not working..

any clue?

Upvotes: 0

Views: 42

Answers (2)

Aman
Aman

Reputation: 838

you cant use rewrite rule in apache tomcat use it with mod_jk or virtual host

Upvotes: 0

Abacus
Abacus

Reputation: 19451

You look for second at the beginning of the path, but the path has cms there. So change it to:

RewriteRule ^cms/second/([^/]*)/?(.*)$ second.jsp?name=$1&page=$2

Upvotes: 1

Related Questions