Here is the scenario:
Dynamic url:
- Code: Select all
http://localhost/GeekMantra/subsection?section=JSP
Final static url I want is:
- Code: Select all
http://localhost/GeekMantra/subsection/section/JSP
All the things are going fine but I can't able to implement the url rewrite rule, means I can't able to figure out where should I place my rewrite rule so that apache can map it in static url.
I had tried the following in httpd.conf file but with no success:
- Code: Select all
<VirtualHost localhost:8080>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
ServerName localhost
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
Options +FollowSymLinks
RewriteEngine on
RewriteRule http://localhost/subsection/(.*)/(.*)/$ /GeekMantra/subsection?$1=$2
</VirtualHost>
Please help as I am desperately want it to be done.