mod_rewrite not working. Nothing really happens.

Discussion in 'Apache' started by kaisellgren, Feb 24, 2007.

  1. #1
    Hi,

    url: http://localhost/dreamtutorials/tutorials/3

    .htaccess code:
    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /dreamtutorials/
    RewriteRule ^/tutorials/(.*)$ tutorials.php?cat=$1 [L]
    Code (markup):
    And it should move you to: http://localhost/dreamtutorials/tutorials.php?cat=3

    But it doesn't do anything, 404 not found :(

    mod_rewrite is loaded.
     
    kaisellgren, Feb 24, 2007 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    Nintendo, Feb 24, 2007 IP
  3. rodney88

    rodney88 Guest

    Messages:
    480
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That's ridiculous. The host has absolutely nothing to do with mod_rewrite - it's an apache module that will function exactly the same, regardless of the hostname.

    kaisellgren, where are you putting that htaccess code? At a glance, I'd suggest trying it without the first slash in the RewriteRule - i.e.
    RewriteRule ^tutorials/(.*)$ tutorials.php?cat=$1 [L]
     
    rodney88, Feb 25, 2007 IP
  4. tespio

    tespio Peon

    Messages:
    16
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    First of all mod_rewrite must be loaded at Apache's start time. So ask admins to see if the LoadModule and/or ActivateModule (where the case) for mod_rewrite is in place and not commented out.
     
    tespio, Feb 26, 2007 IP