1

Anyone here knows how to do this on .htaccess? I need to replace the part of URL that is inside the "[]".

Here is the URL: [http://example.com/site/second/files/]2012/08/Image.jpg
with this new URL: [http://example-two.com/media1/]2012/08/Image.jpg

Thanks in advance!

2 Answers 2

4
RewriteRule ^site/second/files/(.*)$ http://example-two.com/media1/$1 [L]
Sign up to request clarification or add additional context in comments.

Comments

0

You could also use mod_alias:

Redirect 301 /site/second/files http://example-two.com/media1/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.