Jump to content
php.lv forumi

Apache mod_rewritre nestrādā "backreference"


Blitz

Recommended Posts

Sveiki,

 

ir 2 hosti, galvenais aa.lv un testēšanai test.aa.lv kas atrodas uz viena servera.

aa.lv .htaccess satur:

RewriteEngine On
RewriteRule ^([a-z-]*)$ ?page=group_parent&link=$1 [L]

rezultatā ievadot aa.lv/abc $_GET['page']==group_parent un $_GET['link']==abc

 

uz test.aa.lv .htaccess satur to pašu

RewriteEngine On
RewriteRule ^([a-z-]*)$ ?page=group_parent&link=$1 [L]

bet ievadot urli test.aa.lv/abc $_GET['page']==group_parent un $_GET['link'] ir tukšs.

ja pamainu kodu uz

RewriteEngine On
RewriteRule ^([a-z-]*)$ ?page=group_parent&link=abc [L]

tad $_GET['page']==group_parent un $_GET['link']==abc,

tātad nestrāda reference. Kāpēc?

Aizrakstiju uz hosta supportu, šieie ar rausta plecus, tāka drošvien kāda ninase sakarā ar subdomeinu.

 

Jau iepriekš- paldies.

Link to comment
Share on other sites

jau vairaaak kart esmu publicejis

bet rekur velreiz

 

htaccess

Options +FollowSymLinks

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php?link=$1 [L,QSA][size=2]

 

 

ar sho htaccess tu iegusti

 

.lv/(.*) kaa .lv/?link=(.*)

Edited by EdgarsA
Link to comment
Share on other sites

  • 4 weeks later...

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...