Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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

share|improve this question

migrated from 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 – sam Jun 15 '11 at 21:57

1 Answer 1

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.