Created
April 23, 2019 17:20
-
-
Save xlimit91/e960b7c2ba989736d74496121b2467c7 to your computer and use it in GitHub Desktop.
.htaccess replace a part of the url - redirect 301 wildcard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example: | |
# OLD URL: http://website.com/xxx/yyy/picture.png | |
# NEW URL: http://website.com/wp-content/picture.png | |
# So, I want to replace /xxx/yyy/ with the normal /wp-content/ path of WordPress. | |
# Put this in your .htaccess file. | |
RewriteEngine on | |
RedirectMatch 301 /xxx/yyy/(.*) http://website.com/wp-content/$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment