markjaquith / feedback

Ask @markjaquith anything!
42 stars 4 forks source link

WordPress installation redirect to strange url #43

Closed ivankristianto closed 8 years ago

ivankristianto commented 9 years ago

Hi Mark,

I tried to use your WordPress-Skeleton on a virtual host.

Here is my environment: Windows 7 64 bit. XAMPP Version 1.8.2 PHP Version 5.4.16 Apache Version Apache/2.4.4 (Win32) OpenSSL/0.9.8y PHP/5.4.16

i create a virtual host like this:

<VirtualHost *:80>
DocumentRoot "D:/HTDOCS/wpskel"
ServerName wpskel.local
UseCanonicalName Off
<Directory "D:/HTDOCS/wpskel">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Require all granted
</Directory>
</VirtualHost>

But when i tried to install, WordPress redirect to strange url: http://wpskel.localhttp//wpskel.local/wp/wp-admin/install.php

i follow the code and trace it, the strange issue is because wp_guess_url() (in wp-includes/functions.php) return strange $url. after i dig more, the $_SERVER['REQUEST_URI'] return Full URL path instead of URI.

Can you please help me to figure this out? is this a bugs from WordPress?

Notes: if i go directly to http://wpskel.local/wp/wp-admin/install.php, the installation screen show up but all the styles and javascript is load with wrong url. i guess load-style and load-script is also use the same $_SERVER['REQUEST_URI'].

Thanks Ivan

markjaquith commented 9 years ago

Have you tried setting WP_HOME and WP_SITEURL in wp-config.php?

http://codex.wordpress.org/Changing_The_Site_URL