Problem with htaccess in home

Discussion in 'Apache' started by Max134, Jan 24, 2011.

  1. #1
    Hello

    I'm now working in my pc, so to access my web I type:

    http://localhost/myweb/

    I want to make a friendly web, in diferent languages, so I want:

    http://localhost/myweb/en/ be equivalent to: http://localhost/myweb/index.php?language=en

    when I load files in server it will be:

    http://www.mysite.com/en/ equivalent to: http://www.mysite.com/index.php?lang=en

    But it doesn't work for me. My htaccess file is:

    RewriteEngine on
    RewriteRule ([A-Za-z]*)/ index.php?idioma=$1
    Code (markup):
    I try differents ways but it doesn't work properly.

    Thanks in advance !
     
    Max134, Jan 24, 2011 IP
  2. mysqlxpert

    mysqlxpert Greenhorn

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #2
    On local machine use RewriteBase to resolve the issue e.g.

    RewriteEngine on
    RewriteBase /myweb
    RewriteRule ([A-Za-z]*)/ index.php?idioma=$1
    Code (markup):
    let me know if you need more help
     
    mysqlxpert, Jan 24, 2011 IP