javascript - Simple URL query parse and re-direct -
i'm looking doing think should pretty simple in javascript. have query string in format of 9sjn25-30-10 want able pass 1 url (e.g., www.example.com/?q=9sjn25-30-10. want able automatically parse url , re-direct url in following format: www.domain.com/journal/year9/issue25/article30/page10/ numbers pulled query string , inserted shown in previous example.
it nice if re-direct script disallow characters or symbols other letters, numbers, , dashes , display error message if input query not strictly in format of #sjn#-#-# (with # representing number 1 or more digits long , letters sjn hardcoded).
any appreciated!
Comments
Post a Comment