So if someone requests /free-reports/no-more-metal, you want to show them the page at /free-reports?reportid=1259? Is it important for you that the url visibly change? Or do you just want the request to be rewritten?
If you only care that the query string be passed on but don't need it to be visibly rewritten, you could use the /config/UrlRewriting.config file. An entry like this should do the trick:
And then add those two config files to the /config folder. The RewriteRules.config is for more complex and systematic rewrite rules. In theRewriteRules.config`, just add the following:
I'd like to point out that if you go with the above IIS Url Rewriting Module, but forget to install that module on the server running your site, you will get a really, really vague error. Just remember to install the module on every server your site will run on. This probably means installing it on your local machine as well (if it isn't already installed).
Redirect rule
Hi,
I want to redirect this url /free-reports?reportid=1259 on this url /free-reports/no-more-metal
please help me
So if someone requests
/free-reports/no-more-metal
, you want to show them the page at/free-reports?reportid=1259
? Is it important for you that the url visibly change? Or do you just want the request to be rewritten?If you only care that the query string be passed on but don't need it to be visibly rewritten, you could use the
/config/UrlRewriting.config
file. An entry like this should do the trick:If you want the url to be visibly rewritten, I really like to use the IIS Url Rewriting Module for that sort of thing. In the web.config add this:
And then add those two config files to the
/config
folder. TheRewriteRules.config is for more complex and systematic rewrite rules. In the
RewriteRules.config`, just add the following:In the
RewriteMaps.config
, add:I'd like to point out that if you go with the above IIS Url Rewriting Module, but forget to install that module on the server running your site, you will get a really, really vague error. Just remember to install the module on every server your site will run on. This probably means installing it on your local machine as well (if it isn't already installed).
Let me know if this helps at all.
is working on a reply...