Url rewrite - replacing characters

Posted on 2008-11-03
Last Modified: 2012-06-21
Hello all,

I know close to nothing about rewrite so what i have is copied from other solutions and works great but i need more... Namely:
Right now I use attached code to make links look like
Instead of :

What I need it to be is something more like:
If possible at all...

strings can sometimes have 4 paramters!
Up to A_Id4= (there's only 1 with text other 3 will always be numeric... the one with text is more show then function

If not possible... anything making it look more like a static filename where the parameter after A_Id1= Title_Of_article - has a big role...

Is there an easy page on the web where i can find out more on how to get this done or suggestions... Remember plz MEGANOOOOBB!!!!!

Thanks for any suggestions!
Bobby V
RewriteRule (.*?\.asp)(\?[^~]*)?~([^~]*)~([^~]*)(.*) $1(?2$2&:\?)$3=$4$5 [NS,I]
RewriteRule   ^(.*)\s(.*)$      $1_$2 [N]

Open in new window

Question by:Witheet
  • 2

Expert Comment

ID: 22896580
hello, check my example in ASP

It has the solution for your problem
URL = "result_article.asp~A_Id~Title_Of_Article~A_Id2~31~A_Id3~33"
if left(URL,19) = "result_article.asp~" then
	URL1 = Replace(left(URL,19),"~","=")
	URL2 = MID(URL,20,200)
	URL2Total = Replace(URL2,"~","_")
end if

Open in new window


Accepted Solution

nkoriginal earned 500 total points
ID: 22896612
Sorry, check this

I just put one variable to show the entire URL after the automatically modification

The variable name is URL_NEW. this variable it will show you the new URL with the = and _ oir whatever you want
URL = "result_article.asp~A_Id~Title_Of_Article~A_Id2~31~A_Id3~33"
if left(URL,19) = "result_article.asp~" then
	URL1 = Replace(left(URL,19),"~","=")
	URL2 = MID(URL,20,200)
	URL2Total = Replace(URL2,"~","_")
	URL_NEW = URL1 & URL2Total
end if

Open in new window


Author Comment

ID: 22897655
Thanx for the post... I'll post back asap with results...

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JQuery Autocomplete Tag AJAX (Need nice script) 11 57
asp classic find word in string and get its value 7 32
Clear input text 15 26
SP result not being displayed 5 36
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question