What's the quickest/cheapest means to get URL rewriting applied?
We took care of to do numerous hundred items in under 8 hrs. Below was our circumstance :
We had :
- Dog hideous URLs that were loaded with useless parameters
- In - residence programmers
- Full accessibility to the SQL data source and also schema
- IIS6/xx _ link_0 (yet we can have done this for others)
Our items table resembled this :
ID | Product Name | Description | etc ------------------------------------- 001|Product 1 | This is... | etc 002|Product 1 | This is... | etc 003|Product 1 | This is... | etc
So we created a tiny set program that would certainly loop via our
products table and also create access in our
httpd.ini documents (ISAPI Rewrite's variation of
.htaccess), to make sure that we wound up with a documents with thousands of access similar to this :
RewriteRule (/product-1/) /DLLFolder/Requester.dll?APPLICATION=MyApp&PROGRAM=Products&ARGUMENTS=-N001 [I,O,U] * Please see please note
Our items do not transform really usually, so we simply re - run this by hand each time we included something. Not classy, yet this has to do with obtaining it done quick/cheap.
After that, almost everywhere that our web links were published to items, we simply saw to it that the web links were outputted to their complete URL.
This took around 8 hrs in total amount.
A solitary common URL Rewriting regulation that looks something similar to this :
RewriteRule (/products/)(.*/)(.*) /DLLFolder/Requester.dll?APPLICATION=MyApp&PROGRAM=Products&ARGUMENTS=-N$3 [I,O,U] * Please see please note
This suggested we can write :
And it would certainly revise to the proper URL. After that it's simply an issue of transforming the result of your URL web links.
* PLEASE NOTE : My regex abilities are really corroded and also I made those up on the place. They might be incorrect. Your milage on the real regex's might differ, yet the principle still stands.