Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

how to redirect to URL with ?

Discussion in 'General Discussion' started by makersky, Apr 11, 2005.

  1. makersky

    makersky Member

    Joined:
    Nov 26, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    151
    hello,

    i would like to set redirection:

    /something -> /something.php?foo=bar

    when i set up such redir (via cpanel or manually in .htaccess) i get:

    Not Found
    The requested URL /something.php\%3ffoo=bar was not found on this server.

    browser treats redirection as file name ('something.php?foo=bar') due to %-convertion - not as filename ('something.php') with parameters ('foo=bar').

    what should i do to make apache behave properly ?
     
  2. ZapX.net

    ZapX.net Well-Known Member

    Joined:
    Feb 24, 2005
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Sidman, PA
    Have you tried using ModRewrite? Maybe something like:

    Code:
    RewriteRule ^something$ something.php?foo=bar [QSA]
     
  3. makersky

    makersky Member

    Joined:
    Nov 26, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    151
    yes i know solution with mod_rewrite - i need this for my clients - they know only cpanel :(
    and cpanel uses redirect from mod_alias :/
     
  4. makersky

    makersky Member

    Joined:
    Nov 26, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    151
    i found something:

    1. cpanel 9.9.9-S15:

    RedirectMatch temp ^/something$ /something.php?foo=bar

    2. prior to cpanel 9.9.9-S15:

    Redirect temp /something /something.php?foo=bar


    First one does not work, second is ok.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice