The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Redirecting to an URL with query string [moved]

Discussion in 'General Discussion' started by DeadManWalking, Jan 12, 2006.

  1. DeadManWalking

    DeadManWalking Active Member

    Joined:
    Dec 9, 2004
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Japan
  2. rustelekom

    rustelekom Well-Known Member
    PartnerNOC

    Joined:
    Nov 13, 2003
    Messages:
    290
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    moscow
    you cannot redirect url with query string in url using standard cpanel redirect menu. you should look into mod_rewrite technique for realize your requirements. it's not very hard and can done by editing .htaccess file in your web folder. mod_rewrite examples can be found by google.
     
    #2 rustelekom, Jan 15, 2006
    Last edited: Jan 15, 2006
  3. danman

    danman Registered

    Joined:
    Mar 9, 2002
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Royal Oak, Michigan, USA
    I tried to edit the .htaccess file and it did not work. This is the first .htaccess file I have ever edited. Well the edit I did below did not work. Does anyone have any ideas what is wrong? This was a guess edit so to speak, I followed the format of the other redirect that was existing in the .htaccess file prior to any editing.


    Also, why does these query urls not work in cPanel redirects?



    **** Old ".htaccess" file ***

    # -FrontPage-

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName www.allaroundweb.com
    AuthUserFile /home/aaweb/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/aaweb/public_html/_vti_pvt/service.grp




    RedirectMatch temp ^/portal/$ http://allaroundi.com/
    *** EOF ***

    **** New ".htaccess" file ***

    # -FrontPage-

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName www.allaroundweb.com
    AuthUserFile /home/aaweb/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/aaweb/public_html/_vti_pvt/service.grp




    RedirectMatch temp ^/portal/$ http://allaroundi.com/

    RedirectMatch temp ^/faqs/$ http://allaroundweb.com/forum/index.php?c=3
    *** EOF ***

    I changed that last line to

    Redirect /faqs http://allaroundweb.com/forum/index.php?c=3

    then

    Redirect /faqs "http://allaroundweb.com/forum/index.php?c=3"

    This is close, but it puts a / at the end

    http://allaroundweb.com/forum/index.php?c=3/
    Thank you,

    danman
     
    #3 danman, Feb 7, 2006
    Last edited: Feb 7, 2006
  4. danman

    danman Registered

    Joined:
    Mar 9, 2002
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Royal Oak, Michigan, USA
    Frustrated

    I think I have another way of doing this. I would still like to know why this did not work. Any insight would be apreciated.

    danman
     
  5. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    If /faqs is a directory with files in it:
    Code:
    RedirectMatch ^/faqs/.*$ "http://allaroundweb.com/forum/index.php?c=3"
     
Loading...

Share This Page