I would like to redirect/rewrite this two kinds of URLs:
So I just want to redirect the root domain to a new domain, and some pages from my domain to some pages on a new domain...
How can I do that on a JBoss server ?
To rewrite urls you need to configure the webserver to do that (for example in apache with . htaccess . But if you want to do that without use server configuration, a bad solution exists: make a folder with the name of the url and put the html into that with the name index.
A rewrite rule defines the logic of what to compare or match the request URL with, and what to do if the comparison is successful. Rewrite rules consists of the following parts: Pattern – The rule pattern is used to specify either the regular expression or a wildcard pattern that is used to match URL strings.
About the URL Rewrite module The Microsoft URL Rewrite Module 2.0 for IIS 7 and above enables IIS administrators to create powerful customized rules to map request URLs to friendly URLs that are easier for users to remember and easier for search engines to find.
Re: how to use rewrite url in jboss eap 7.0 You can configure a rewrite filter within the undertow subsystem, or you can add a undertow-handlers.conf file to the WEB-INF directory of your webapp. For the direct subsystem configuration, the "host" element can contain "filter-ref" children.
Its class name is org.jboss.web.rewrite.RewriteMap, and its code is: The RewriteRule directive is the real rewriting workhorse. The directive can occur more than once, with each instance defining a single rewrite rule.
anuj_kumar - the $ {1} is the contextual value from the regex command (.*). In your case, it's whatever comes after "scripts/". 4. Re: how to use rewrite url in jboss eap 7.0 I am using jboss eap 7.0 . I am getting error WFLYCTL0211: Cannot resolve expression 'path-prefix'. whats your thoughts on this. 5. Re: how to use rewrite url in jboss eap 7.0
You can configure a rewrite filter within the undertow subsystem, or you can add a undertow-handlers.conf file to the WEB-INF directory of your webapp. For the direct subsystem configuration, the "host" element can contain "filter-ref" children.
Have you looked into http://www.jboss.org/jbossweb/modules/rewrite.html? It looks like what you're looking for, and it's pretty similar to Mod_rewrite for Apache.
You might take a look at this http://code.google.com/p/urlrewritefilter/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With