Treehouse: Grow your CSS skills. Land your dream job.

Rewrite to root?

  • # February 18, 2012 at 7:10 am

    Why doesn’t this work?

    RewriteRule ^/([^/]+)$ profile.php?name=$1

    I want /profile.php?name=Schart to go to /Schart.

    # February 25, 2012 at 10:32 am

    You need to ensure the RewriteEngine is on
    You also need mod_rewrite enabled in your Apache config

    Try this

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule ^/([^/]+)$ profile.php?name=$1
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.