0
votes

Want im trying to acheive, when url is hitting localhost/nap/ , internally it should call the url localhost/nap/inspect.do

To acheive this, Using Apache 2.2, following are the steps i followed,

  1. Uncomment the line, LoadModule rewrite_module modules/mod_rewrite.so
  2. Added he following line in httpd.cnf file RewriteEngine On RewriteCond %{REQUEST_URI} !^/nap/ RewriteRule ^(.*)$ /nap/inspect.do$1 [L] restarted the apache server

    But this configuration doesnt help me

1

1 Answers

0
votes

You need only this in httpd.cnf file:

RewriteEngine On
RewriteRule ^/nap/$ /nap/inspect.do [L]

All requests with /localhost/nap/ will be redirected to run the file $DocumentRoot/nap/inspect.do script. L flag ignores all additional rewrite rules in the same file.