How to redirect a URL with old format using .htaccess?

Discussion in 'Programming' started by dinamit.ir, Feb 17, 2014.

  1. #1
    cms:joomla/php5.4.12/apache2.4.4/wampserver

    I want to send a date parameter from homepage to a page (for example /archives.html) via GET method in php/apache

    The clean URL of the link is:

    127.0.0.1/archives.html/2014-5-17
    Code (markup):
    So I have to redirect this to (for sending via GET method):

    127.0.0.1/?option=com_archives&date=2014-5-17
    Code (markup):
    by this htaccess code:

    RewriteRule ^(archives\.html)/([0-9-]+)/?$ /$1/?option=com_arcives&date=$2 [L,NC,QSA,R]
    Code (markup):
    The problem is that the beginning URL is a clean URL but the destination َURL is not.

    I used R flah and R flag it doesn't change the URL in browser (changes only internally) but for me do not work that rule!

    why? how can I reslove this problem?

    How can I have in source and destination a same clean URL and also send parameters to the destination?
     
    dinamit.ir, Feb 17, 2014 IP