0

I need to 301 redirect in .htaccess from old site with folder structure to new page that uses the ending folder name as a url param.

like this:

http://example.com/artists/artist-name

to

http://example.com/search-works.php?searchArtist=artist-name

1 Answer 1

1

a couple options:

RewriteRule ^artists/artist-name$ /search-works.php?searchArtist=artist-name [R=301,NC,L]

or

RewriteRule ^artists/(.*)$ /search-works.php?searchArtist=$1 [R=301,NC,L]
Sign up to request clarification or add additional context in comments.

1 Comment

2nd option is exactly what I was looking for

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.