Results 1 to 4 of 4

Thread: apache mod_rewrite not working

  1. #1
    Join Date
    Jun 2011
    Beans
    1

    apache mod_rewrite not working

    I can't for the life of me figure out what's going wrong here.

    I have mod_rewrite and mod_proxy loaded properly for the apache2 package in 11.04.

    I added the following to the bottom of my apache2.conf:

    RewriteEngine: On
    RewriteRule: ^/$ /test [L]

    The server restarts fine, but / is not getting rewritten in the slightest. And when I added the RewriteLog directive, the log file had absolutely nothing in it. What might be the issue here?

  2. #2
    Join Date
    Jun 2007
    Location
    Paraparaumu, New Zealand
    Beans
    Hidden!

    Re: apache mod_rewrite not working

    Thread moved to Server Platforms.
    Forum DOs and DON'Ts
    Please use CODE tags
    Including your email address in a post is not recommended
    My Blog

  3. #3
    Join Date
    Mar 2007
    Beans
    227

    Re: apache mod_rewrite not working

    Same here. For the life of me cannot figure this out. Have followed a slew of examples.

    Did you find a solution?



    Quote Originally Posted by whyiturn View Post
    I can't for the life of me figure out what's going wrong here.

    I have mod_rewrite and mod_proxy loaded properly for the apache2 package in 11.04.

    I added the following to the bottom of my apache2.conf:

    RewriteEngine: On
    RewriteRule: ^/$ /test [L]

    The server restarts fine, but / is not getting rewritten in the slightest. And when I added the RewriteLog directive, the log file had absolutely nothing in it. What might be the issue here?

  4. #4
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: apache mod_rewrite not working

    You need to put these directives in the <VirtualHost> container for the site in question. Rewrite commands are not global; they apply to specific virtual hosts.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •