2017-12-31 214 views
6

çoğaltmak için yönlendirir: www.test.local WAMP www.test.local http benziyor url için bu isteği yönlendirir karar verir /www.test.local/ Ve bir hata alacağım. Ancak, ana bilgisayara (WAMP ile) URL'ye eriştiğimde yönlendirme gerçekleşmez. Ana wordpress htaccess'i kaldırmaya çalıştım. Web sitesi yalnızca index.html varsa, bu sorun oluşmaz.uzaktan erişim yerel ağ yani uzaktan cihazdan WordPress web sitesine girdiğinizde url

hata günlüğünden almak Tümü:

[www.test.local/sid#1a426ce7a18][rid#1a432dc9390/initial] [perdir C:/Users/{MyUser}/work/test/www/] strip per-dir prefix: C:/Users/{MyUser}/work/test/www/ -> 
[www.test.local/sid#1a426ce7a18][rid#1a432dc9390/initial] [perdir C:/Users/{MyUser}/work/test/www/] applying pattern '^index\\.php$' to uri '' 
[www.test.local/sid#1a426ce7a18][rid#1a432dc9390/initial] [perdir C:/Users/{MyUser}/work/test/www/] strip per-dir prefix: C:/Users/{MyUser}/work/test/www/ -> 
[www.test.local/sid#1a426ce7a18][rid#1a432dc9390/initial] [perdir C:/Users/{MyUser}/work/test/www/] applying pattern '.' to uri '' 
[www.test.local/sid#1a426ce7a18][rid#1a432dc9390/initial] [perdir C:/Users/{MyUser}/work/test/www/] pass through C:/Users/{MyUser}/work/test/www/ 
[www.test.local/sid#1a426ce7a18][rid#1a4296ec5d0/subreq] [perdir C:/Users/{MyUser}/work/test/www/] strip per-dir prefix: C:/Users/{MyUser}/work/test/www/index.php -> index.php 
[www.test.local/sid#1a426ce7a18][rid#1a4296ec5d0/subreq] [perdir C:/Users/{MyUser}/work/test/www/] applying pattern '^index\\.php$' to uri 'index.php' 
[www.test.local/sid#1a426ce7a18][rid#1a4296ec5d0/subreq] [perdir C:/Users/{MyUser}/work/test/www/] pass through C:/Users/{MyUser}/work/test/www/index.php 
[www.test.localhttp/sid#1a426ce7a18][rid#1a4334b9cc0/initial] [perdir C:/Users/{MyUser}/work/test/www/] add path info postfix: C:/Users/{MyUser}/work/test/www/www.test.local -> C:/Users/{MyUser}/work/test/www/www.test.local/ 
[www.test.localhttp/sid#1a426ce7a18][rid#1a4334b9cc0/initial] [perdir C:/Users/{MyUser}/work/test/www/] strip per-dir prefix: C:/Users/{MyUser}/work/test/www/www.test.local/ -> www.test.local/ 
[www.test.localhttp/sid#1a426ce7a18][rid#1a4334b9cc0/initial] [perdir C:/Users/{MyUser}/work/test/www/] applying pattern '^index\\.php$' to uri 'www.test.local/' 
[www.test.localhttp/sid#1a426ce7a18][rid#1a4334b9cc0/initial] [perdir C:/Users/{MyUser}/work/test/www/] add path info postfix: C:/Users/{MyUser}/work/test/www/www.test.local -> C:/Users/{MyUser}/work/test/www/www.test.local/ 
[www.test.localhttp/sid#1a426ce7a18][rid#1a4334b9cc0/initial] [perdir C:/Users/{MyUser}/work/test/www/] strip per-dir prefix: C:/Users/{MyUser}/work/test/www/www.test.local/ -> www.test.local/ 
[www.test.localhttp/sid#1a426ce7a18][rid#1a4334b9cc0/initial] [perdir C:/Users/{MyUser}/work/test/www/] applying pattern '.' to uri 'www.test.local/' 
[www.test.localhttp/sid#1a426ce7a18][rid#1a4334b9cc0/initial] [perdir C:/Users/{MyUser}/work/test/www/] RewriteCond: input='C:/Users/{MyUser}/work/test/www/www.test.local' pattern='!-f' => matched 
[www.test.localhttp/sid#1a426ce7a18][rid#1a4334b9cc0/initial] [perdir C:/Users/{MyUser}/work/test/www/] RewriteCond: input='C:/Users/{MyUser}/work/test/www/www.test.local' pattern='!-d' => matched 
[www.test.localhttp/sid#1a426ce7a18][rid#1a4334b9cc0/initial] [perdir C:/Users/{MyUser}/work/test/www/] rewrite 'www.test.local/' -> '/index.php' 
[www.test.localhttp/sid#1a426ce7a18][rid#1a4334b9cc0/initial] [perdir C:/Users/{MyUser}/work/test/www/] trying to replace prefix C:/Users/{MyUser}/work/test/www/ with/
[www.test.localhttp/sid#1a426ce7a18][rid#1a4334b9cc0/initial] [perdir C:/Users/{MyUser}/work/test/www/] trying to replace context docroot c:/Users/{MyUser}/work/test/www with context prefix 
[www.test.localhttp/sid#1a426ce7a18][rid#1a4334b9cc0/initial] [perdir C:/Users/{MyUser}/work/test/www/] internal redirect with /index.php [INTERNAL REDIRECT] 
[www.test.localhttp/sid#1a426ce7a18][rid#1a4334a4b68/initial/redir#1] [perdir C:/Users/{MyUser}/work/test/www/] strip per-dir prefix: C:/Users/{MyUser}/work/test/www/index.php -> index.php 
[www.test.localhttp/sid#1a426ce7a18][rid#1a4334a4b68/initial/redir#1] [perdir C:/Users/{MyUser}/work/test/www/] applying pattern '^index\\.php$' to uri 'index.php' 
[www.test.localhttp/sid#1a426ce7a18][rid#1a4334a4b68/initial/redir#1] [perdir C:/Users/{MyUser}/work/test/www/] pass through C:/Users/{MyUser}/work/test/www/index.php 
[www.test.localhttphttp/sid#1a426ce7a18][rid#1a4426f31f0/initial] [perdir C:/Users/{MyUser}/work/test/www/] add path info postfix: C:/Users/{MyUser}/work/test/www/www.test.localhttp -> C:/Users/{MyUser}/work/test/www/www.test.localhttp/www.test.local/ 
[www.test.localhttphttp/sid#1a426ce7a18][rid#1a4426f31f0/initial] [perdir C:/Users/{MyUser}/work/test/www/] strip per-dir prefix: C:/Users/{MyUser}/work/test/www/www.test.localhttp/www.test.local/ -> www.test.localhttp/www.test.local/ 

Benim sankonlar dosyası:

<VirtualHost *:80> 
ServerName localhost2.local 
ServerAlias *.*.local 
VirtualDocumentRoot "c:/Users/{MyUser}/work/%2/%1/" 
<Directory "c:/Users/{MyUser}/work/"> 
    ServerSignature Off 
    Options Indexes FollowSymLinks IncludesNoExec 
    AllowOverride All 
    Order allow,deny 
    Allow from all 
    # Insert the following: 
    Require all granted 
</Directory> 
</VirtualHost> 

Ben standart WP .htacces oluşturulan kullanacaksa:

# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 
</IfModule> 

# END WordPress 

sonuç olduğunu URL, www.test.localhttphttphttp ... vb. yönüne yeniden yönlendirilir. sınıra ulaşılır ... Uzak aygıtta WAMP pc IP bir proxy olarak bulunur. Yönlendirme nereden kaynaklanıyor olabilir?

DÜZENLEME: Güncelleştirilmiş günlük - bu yeniden yazma izlemenin ne olduğunu gösterir. Localhost makinesinden erişirken, 9 numaralı satırın sonuna kadar aynıdır ve daha sonra her zamanki gibi varlıkları vb. Çağırır ...

+0

da arka taraftaki permalink'i sıfırlama sorunuzu .htaccess dosyasını içerecek şekilde güncelleyebilir misiniz? – Ben

+0

@Ben .htaccess soruna eklendi. Apache sürümü 2.4.23 ... – Jan

+0

Cihazdan * .local etki alanındaki diğer web sitelerine erişebilir misiniz? 192.168.0.3 uzaktaki cihaz mı? – JBoulhous

cevap

0

Site URL'nizi ve alan adınızı wordpress yapılandırmasında güncellemeniz gerekir. Bu, adı hatırlamıyorum bir tabloda bir seri hale getirilmiş veriler olarak kaydedilir.

en kolay düzeltme düzenleme index.php ve sonunda ekleyin:

update_option('siteurl', 'http://www.test.local'); 
update_option('home', 'http://www.test.local'); 

sitenizi bu wordpress yapılandırmasını güncelleyecektir açın. Sonra bu satırları silebilir ve index.php'yi olduğu gibi bırakabilirsiniz.

Tarayıcınızın önbellek veya gizli modunu ve açık www.test.local

+0

Sorun görünmüyor ... Komut dosyası güncellenmiş olabileceği yerlere ulaştığında ve bu seçenekleri wp-config.php dosyasında tanımladığımda zaten siteye yönlendiriliyor ... cevap daha fazlasını söyleyebilir ... – Jan

+0

Yönlendirme önbelleğe almış olabilir. Farklı bir tarayıcı veya gizli modda deneyin – albert

+0

Elbette bunu denedim ... – Jan

2

DÜZENLEME kullanın: soruya güncellemeler açıklığa kavuşturmak gibi bu sorun görünmüyor. Hala bunu yararlı bulabilen rastgele kullanıcılara bırakıyorum. -

Sen wp_options tablosundaki 'http://www.test.local/ '(ikisi için de aynı değer) s 'option_value için' option_name' s 'ev' ve' SITEURL güncelleyebilirsiniz:

Wordpress sitenizin URL'sini güncellemek için

 UPDATE [yourWPDB].wp_options 
    SET option_value='http://www.test.local/' 
    WHERE option_name = 'home' OR option_name = 'siteurl' 

Ayrıca güncellemek için wordpress kök wp-config.php dosyasına aşağıdaki satırları ekleyebilirsiniz -

 define('WP_SITEURL', 'http://www.test.local/'); 
    define('WP_HOME', 'http://www.test.local/'); 
0

u deneyin pdating options değerleri 'siteurl' => 'http://www.test.local'); 'home' => 'http://www.test.local' veritabanı (wp_options) tablosundan ve URL'lerin sonunda izleyen eğik çizgi koymadığı gibi .. ör. www.test.local/..