httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jayaram Ponnusamy <jayaram.ponnus...@gmail.com>
Subject [users@httpd] Help On RewriteRule
Date Sun, 07 Aug 2016 10:47:56 GMT
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 and In Address Bar we are getting From URL as
expected.

We have filtering option to select year & Month to view news articles. The
below rewriteRule help to manually enter the URL, but we would like to keep
the same as dynamically.
For example, if User selects year 2010 and month 6 then they should get the
page with SEO friendly URL in the address bar
http://cmspweb1.com/sites/en_US/about/newsroom/2010/6 instead of
http://cmspweb1.com/sites/en_US/about/newsroom?year=2010&month=6

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 [P]


Kindly please help me on this.

Thanks
Jayaram

--

Mime
View raw message