.htaccess and mod_rewrite discussion

Discussion in 'Apache' started by newyorkcity, Feb 10, 2006.

  1. #1
    Let us discuss on .htaccess and mod_rewrite.

    Could you please enlighten me about how to make URLs search engine friendly?
     
    newyorkcity, Feb 10, 2006 IP
  2. pgu1020

    pgu1020 Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi.. Facing the same interesting thing..

    I have got this to work with Internet Explorer, but in firefox it generates an error like this.

    While trying to retrieve the URL: "http://begagnade-datorer.se/hsphere/local/home/username/begagnade-datorer.se/%5bURL=http://www.begagnade-datorer.se/hsphere/local/home/username/begagnade-datorer.se/%5bURL="
    The following error was encountered:
    * Invalid URL

    So it creates like a loop of some kind.


    this is the mod_rewrite code i used for making the 301 redirect from domain.com to www.domain.com
    and also domain.com/index.html to www.domain.com/index.htm
    -----------
    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www\.begagnade-datorer\.se [NC]
    RewriteRule ^(.*) http://www.begagnade-datorer.se/$1 [L,R=301]
    ----------

    It works perfect in IE but not in firefox...

    Any suggestions?
     
    pgu1020, Feb 10, 2006 IP
  3. mdvaldosta

    mdvaldosta Peon

    Messages:
    4,079
    Likes Received:
    362
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You'd get a better response in the site/server administration area. Also, that makeshift signature is probably against the rules.
     
    mdvaldosta, Feb 10, 2006 IP
  4. pgu1020

    pgu1020 Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Sorry, iam not following what you mean with the makeshift signature.

    The mod_rewrite code that i wrote earlier is in the .htaccess file and it seems to work perfect in IE, but not i Firefox.

    Somehow i get the error of invalid URL message and its really annoying.

    The code was found on a forum, and it seems to do the work. My webhotel dont give a shit and tell me to aks other users so i am kind of stuck.
     
    pgu1020, Feb 10, 2006 IP
  5. mdvaldosta

    mdvaldosta Peon

    Messages:
    4,079
    Likes Received:
    362
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I was referring to the topic starter's signature, not yours. Tops has edited his post. I can't help you with your mod_rewrite though, best of luck. Maybe you'll get lucky and Nintendo will come in.
     
    mdvaldosta, Feb 10, 2006 IP
  6. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #6
    I'm not sure how to do the www. stuff.

    And for New Your City :D, check the sticky thread in this board.
     
    Nintendo, Feb 10, 2006 IP