Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I had urls with /content/ prefix e.g. mysite.com/content/bla-bla-bla/ now I whant redirect all to mysite.com/bla-bla-bla/ without /content/ Is this possible? Thanks!

share|improve this question

migrated from serverfault.com Jun 16 '11 at 2:09

This question came from our site for system and network administrators.

Apache? IIS? NGINX? What software? Can you use Rewrites? Need more info – Smudge Jun 15 '11 at 21:57

It is possible -- but you need to tell at least which web server do you use.

For Apache this can be achieved with the following rule (using mod_rewrite):

RewriteEngine On
RewriteRule ^content/(.+)$ /$1 [R=301,NC,L]

If you are using Microsoft IIS7.x then it is also possible with the help of URL Rewrite Module (you may need to download and install it separately -- depends which IIS version you have):

<rule name="redirect /content/" stopProcessing="true">
    <match url="^content/(.+)$" />
    <action type="Redirect" url="/{R:1}" />
share|improve this answer

Your Answer


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