php - How to redirect a URL with old format using .htaccess? -
I want to send a page to a parameter on the page (for example The link's clear URL is: It must be redirected (to send through the by this HTXus code: The problem is that the beginning URL is a clean URL, but the destination Ù? The URL is not. How can the source and destination have the same clean URL and send the parameters to the destination? HTACAC file: Remove /archives.html ) I) via the
received method.
127.0.0.1/archives.html/2014-5-17
GET method):
127.0.0.1/?option= Com_archives and date = 2014-5-17
revised rule ^ (archives .. html) / ([0-9-] +) /? $ Http://127.0.0.1/archives.html/?option=com_arcives&date=$2 [L, NC, QSA]
## # Pappage Joomla # @ Copyright Copyright (C) 2005 - 2013 Open Source Issue All Rights Reserved. # @License GNU General Public License Version 2 or later; See LICENSE.txt #### # Read it completely if you choose to use this file! # # The line right below this section: # Problems with some server configurations due to 'option + follow link' is required for the use of this mod_rewrite, but already set to # by your server administrator If it fails to convert # to your .htaccess file, if it causes your server to cause an error, then comment it (add #include # of the line), your browser Please reload your site and test your safe URL. If they work, # it has been set by your server administrator and you do not need to set up here. ## ## If errors are the cause, comments can be made, see above notes option + follow-up symlinks ## Modidroit in use ## Start - Rewrite the rules to prevent some common causes # If you experience problems on your site, then block the actions below # It tries to block the most common type: To take advantage of 'efforts'! ## Stop a script to try base64_encode data within the URL RewriteCond% {QUERY_STRING} base64_encode [^ () * \ ([^]] * \) [or] # Block a script that contains a & lt; Script & gt; Tag in RewriteCond% {QUERY_STRING} (& lt; |% 3C) ([^ s] * s) + cript in URL Block any script in an attempt to set a PHP GLOBALS variable through * (& gt; |% 3E) [nc, or] # URL. RewriteCond% {QUERY_STRING} block any script in an attempt to modify _REQUEST variables via the URL (= | \ [| \% [0- 9A-Z] {0,2}) [or] # URL . RewriteCond% {QUERY_STRING} _REQUEST (= | \ [| \ [[0- 9A-Z] {0,2}) # Return 403 Show content of forbidden header and root homepage revolving Raul. * Index.php [F] ### Finish - Rewrite the rules to stop some common causes ## Get started - Custom redirect # # If you want to redirect some pages, or redirect to # www (or its Contrast), if you want to set up a canonical non-www, keep the code here. Make sure those # redirects use the correct reverse-ray syntax and [R = 301, L] flag. #RewriteRule ^ (Archives .html) / ([0-9 -] +) /? $ / $ 1 /? Option = com_arcives & date = $ 2 [L, NC, QSA] ## Finish - Custom Redirect ## # Simulation The following line if your webserver URL # is not directly related to physical file path # Update your Joomla! Directory (for Roots / Bus) ## # Start the Riverbattbase / # # - Joomla! Core SEF Section # RewriteRule * - [E = HTTP_AUTHORIZATION:% {HTTP: Authorization}] # # If the requested path and file are not /index.php and request # already index.php script RewriteCond% REQUEST_URI}! ^ / Index \ .php # and the request is for something within the component folder, # or for site root, or extensionless URL, or #included url ends with one of the extensions listed RewriteCond% {REQUEST_URI} /component/|(/[^.]*|.(phpHtml?|feed|pdf|vcf|raw))$ [NC] # and the requested path and file do not match directly to a physical file RewriteCond% {REQUEST_FILENAME}! -f # and the requested path and file do not match the physical folder RewriteCond% {REQUEST_FILENAME} directly! -d # rewrite the request for index.php script RewriteRule internally. * Index.php [L] # # End - Joomla! Core SEF section
http: // from target URL:
RewriteRule ^ (archives .html ) / ([0-9 -] +) /? $ / $ 1 /? Options = com_arcives and date = $ 2 [L, NC, QSA]
Comments
Post a Comment