• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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: 28226
95
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