logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Help On URL Rewrites
Author
jponnusamy



Joined: 30 May 2016
Posts: 12
Location: Qatar, Doha

PostPosted: Sun 07 Aug '16 12:06    Post subject: Help On URL Rewrites Reply with quote

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
Redirection is happening fine But we want to keep FROM URL (http://cmspweb1.com/sites/en_US/about/newsroom/2015/4) only in the Browser's Address Bar, and the Redirection should happen only Internally.


Code:
RewriteEngine On    # Turn on the rewriting engine
RewriteRule /sites/en_US/about/newsroom/([0-9]+)/([0-9]+) sites/en_US/about/newsroom?year=$1&month=$2 [R]



Kindly please help me on this.

Thanks
Jayaram
Back to top
mraddi



Joined: 27 Jun 2016
Posts: 152
Location: Schömberg, Baden-Württemberg, Germany

PostPosted: Sun 07 Aug '16 20:04    Post subject: Reply with quote

please read documentation for mod_rewrite (Arrow http://httpd.apache.org/docs/current/mod/mod_rewrite.html), especially the part about "flag and syntax".
Read what R is doing (redirect) and what P can do for you (proxy) Wink
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Wed 10 Aug '16 11:27    Post subject: Reply with quote

Just remove the [R] at your rewrite rule.
Back to top


Reply to topic   Topic: Help On URL Rewrites View previous topic :: View next topic
Post new topic   Forum Index -> Apache