Mod_rewrite - 404 error -Help!!

Discussion in 'Apache' started by Aryavrati, Oct 15, 2007.

  1. #1
    Hi,

    I'm trying to do a silent redirect but am getting a 404 error.

    Options +FollowSymLinks -MultiViews

    <Location "/">
    Options +FollowSymLinks -MultiViews
    AllowOverride All
    </Location>


    RewriteEngine on

    RewriteLog "logs/apache/rewite.log"
    RewriteLogLevel 9
    LogLevel info

    RewriteRule ^/(.*)\/locc(.+)\-x(.*)\-y(.*)\/([^/]+)\.(jpe?g|gif|png|swf|ico|tiff)$ /$1/$5.$6?x=$3&y=$4&loc=$2 [NC,QSA,L]



    ScriptAlias /cgi-bin/ "/home/cgi-bin/"

    <Directory "/home/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews
    Order allow,deny
    SetHandler perl-script
    PerlHandler Apache::Registry
    SetHandler perl-script
    Order allow,deny
    Allow from all
    AddHandler cgi-script .cgi
    </Directory>



    The Url change is taking place correctly, but I'm still getting a 404 error.

    If I put a [R] flag. It works, but I want a silent redirect so the url should stay the same.

    And I'm using Apache 1.3

    Any comments on this appreciated!

    Thanks
     
    Aryavrati, Oct 15, 2007 IP
  2. Ladadadada

    Ladadadada Peon

    Messages:
    382
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Could you give us an example of a URI that doesn't work ?

    I have had a problem before that didn't work without [R] and did work with it but it was actually due to the software parsing the URI on it's own, hence when the URI was different, it worked. I'm not so sure that you're having the same problem.
     
    Ladadadada, Oct 16, 2007 IP
  3. Aryavrati

    Aryavrati Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks Ladadada!

    I got it working ... ur right ... the prob was not in the rewrite but in something else.
     
    Aryavrati, Oct 16, 2007 IP