Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm considering to move the (Confluence) wiki content of www.site.com to the subdomain wiki.site.com to make room for a well-designed landing page (Wordpress) which should take the wiki's place on www.site.com.

Of course I don't want all the wiki links to break. Fortunately, I just need to redirect all URLs that begin with the path /display to the wiki subdomain while preserving the rest of the path, for example:


should both redirect to:


In other words, simply replacing www (or no subdomain) with wiki if the URL path begins with /display.

Am I correct to assume I need an Apache rewrite script to do this? If so, what would be the correct rewrite script for this job?

share|improve this question
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.