Jump to content
php.lv forumi
hoho

mod_rewrite exception

Recommended Posts

Sveiki, 

 

Pašlaik man ir izmantoti sekojoši Rewrite Rules :

 

RewriteRule ^(ru|en|lv)$ index.php?lang=$1 [QSA,L]
RewriteRule ^(ru|en|lv)/(.*/)?([a-zA-Z0-9_-]+)(/)$ index.php?lang=$1&area=$3 [QSA,L]
 
Bet es gribu uztaisīt vienu izņēmumu
 
Redirect 301 /en/test1/ /test1.php
 
piemēram /en/test1/ es gribu uzlikt vienkārši redirektu uz /test1.php, bet pašlaik redirekts notiek uz: /test1.php?lang=en&area=test1
 
Kā uztaisīt izņēmumu, lai tieši šis links būtu bez "lang=en&area=test1"

Share this post


Link to post
Share on other sites

liec kā pirmo rūli.

 

RewriteRule ^(ru|en|lv)/test1(/)? /test1.php [QSA, L]

RewriteRule ^(ru|en|lv)$ index.php?lang=$1 [QSA,L]
RewriteRule ^(ru|en|lv)/(.*/)?([a-zA-Z0-9_-]+)(/)$ index.php?lang=$1&area=$3 [QSA,L]

Share this post


Link to post
Share on other sites

un neizmanto QSA

qsappend|QSA 	Appends any query string from the original request URL to any query string created in the rewrite target.

Share this post


Link to post
Share on other sites

un neizmanto QSA

qsappend|QSA 	Appends any query string from the original request URL to any query string created in the rewrite target.

 

bet varbūt viņam vajag 

/en/test1?dev=true

, lai tomēr aiziet uz

/test1.php?dev=true

?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...