Help On RewriteRule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux