RewriteRule (.*)$ cgi-bin/profile.cgi?$1

I'm very suspicious of catch-all rewrite rules. For one they disable the old URLs, and /cgi-bin/profile.cg?john then becomes /cgi-bin/profile.cgi?cgi-bin/profile.cgi?john internally, which looks very wrong.

It does not work.

How did it not work? Did your browser window dissolve itself in a shower of pink dots? or did the server start to burn? Or did you get any error message? If yes, what? Did you look into the server's log files?

Fwiw mod_rewrite has the RewriteLog directive, and from that log you can usually tell what you did wrong. Of course you need to put some effort into it, which is not as convenient as asking in a forum, but if you solve it yourself it feels much more rewarding. I promise.


In reply to Re^3: .Htaccess rewrites, Mod_Rewrite Help by moritz
in thread .Htaccess rewrites, Mod_Rewrite Help by aceofspace

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.