I would like to redirect the url using RedirectMatch in Apache for example
/ test / single / ?? redirect to / test / two / ??
where represents any string that follows
The redirection that I use below performs a direct redirect, but does not match any line after ... RedirectMatch Permanent ^ / test / one? $ / Test / two /
thanks a lot
RewriteEngine ON RewriteBase / RewriteRule ^/test/one/(.+)$ /test/two/$1
If this does not work, replace ^ / test / one with ^ test / one
make sure mod_rewrite is enabled
You can use mod_rewrite for this:
RewriteEngine On RewriteBase / RewriteRule ^/test/one/(.*) /test/two/$1 [L,R=301]
The R flag redirects the page, not the internal rewriting of the URI. 301 is the HTTP status code for Permanently Relocated - if you prefer to use another, you can change it to one of them .
R
301
Source: https://habr.com/ru/post/1267108/More articles:How to make R script executable? - rHow to copy all the pixels in a circle in a BITMAP image and paste it to another location in the image? - winapiChanges to short_name for place details API - google-mapsapache (port 80) and iis (port 8080) - apacheUnable to move foo.cs. Target folder is the same as the source folder - visual-studioIs the result of OpenCV resize () incorrect? - opencvGet atom state and reset atomize - atomicInterpolation of a 1-dimensional array using OpenCV - opencvRedux architecture for a text editor: working with related states - javascriptWeird.NET Assembly warns when creating my .NET web application. - c #All Articles