• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Help On URL Rewrites

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I made below rewriteRule to redirect URL from http://cmspweb1.com/sites/en_US/about/newsroom/2015/4 to http://cmspweb1.com/sites/en_US/about/newsroom?year=2015&month=4
But we want to keep URL (http://cmspweb1.com/sites/en_US/about/newsroom/2015/4) in the Address Bar, Internally Redirection Should happen.
Kindly please help me on this.



Thanks
Jayaram
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jayaram Ponnusamy wrote:Kindly please help me on this.


Did you have a look at the RewriteRule Flags? You use the [R] flag which does exactly what you don't want to happen: it causes a HTTP redirect to be issued to the browser. If you don't want this, just remove this flag and use e.g. [NC,L] instead.
 
Jayaram Ponnusamy
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I used [P] flag and address is coming as expected.  We need one solution also currently if user selects different year & month then again in the address bar it showing like http://cmspweb1.com/sites/en_US/about/newsroom?year=2015&month=4 . But we dont want to show query string in the Address bar.

Kindly please help me on this.

Thanks
Jayaram
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jayaram Ponnusamy wrote:We need one solution also currently if user selects different year & month then again in the address bar


And where can the user a different year and month?
 
Marshal
Posts: 26912
82
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jayaram Ponnusamy wrote:But we dont want to show query string in the Address bar.



Why not?
 
reply
    Bookmark Topic Watch Topic
  • New Topic