Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #17096

Set web page lang via .htaccess

Path csiph.com!weretis.net!feeder4.news.weretis.net!news.unit0.net!news.nask.pl!news.nask.org.pl!news.internetia.pl!opal.futuro.pl!not-for-mail
From "dentysta" <witekr@interia.pl>
Newsgroups comp.lang.php
Subject Set web page lang via .htaccess
Date Sat, 24 Sep 2016 16:22:30 +0200
Organization Pro Futuro
Lines 29
Message-ID <ns626m$bb$1@opal.futuro.pl> (permalink)
NNTP-Posting-Host v22-97-87.vivaldiego.wroclaw.pl
Mime-Version 1.0
Content-Type text/plain; format=flowed; charset="iso-8859-2"; reply-type=original
Content-Transfer-Encoding 7bit
X-Trace opal.futuro.pl 1474726934 363 195.22.97.87 (24 Sep 2016 14:22:14 GMT)
X-Complaints-To usenet@futuro.pl
NNTP-Posting-Date Sat, 24 Sep 2016 14:22:14 +0000 (UTC)
X-Priority 3
X-MSMail-Priority Normal
Importance Normal
X-Newsreader Microsoft Windows Live Mail 15.4.3555.308
X-MimeOLE Produced By Microsoft MimeOLE V15.4.3555.308
Xref csiph.com comp.lang.php:17096

Show key headers only | View raw


Hi all,

I'm trying to prepare right .htaccee mod rewrite rules for my online shop.

On my store, lang is set by lang_id variable on the url:
http://mystore.com/index.php?lang_id=[pl, en, de] 

I need to rewrite this url to 
http://mystore.com/en/index.php

My .htaccess file alredy have following rule:

RewriteEngine On
RewriteBase /
RewriteRule ^(pl|en)/(.*)$  $2?lang_id=$1 [L,QSA]

How to redirect to (sufix with default lang_id):
http://mystore.com/en/index.php
after writing simple
mystore.com ?

The following rule, added to .htassess doesn't work properly 
:Location /
Redirect 301 /pl/index.php

pozdrawiam / best regards
Edentarius

Back to comp.lang.php | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Set web page lang via .htaccess "dentysta" <witekr@interia.pl> - 2016-09-24 16:22 +0200
  Re: Set web page lang via .htaccess Jerry Stuckle <jstucklex@attglobal.net> - 2016-09-24 10:55 -0400
  Re: Set web page lang via .htaccess Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-09-24 21:44 +0200
    Re: Set web page lang via .htaccess Luuk <luuk@invalid.lan> - 2016-09-24 22:47 +0200
      Re: Set web page lang via .htaccess "R.Wieser" <address@not.available> - 2016-09-25 09:40 +0200

csiph-web