Ich habe Probleme mit meinem WordPress Mein WordPress ist auf einer Subdomain installiert, die blog.lupinedream.com
annimmt. Mein Provider leitet dort getätigte Anfragen an ein Verzeichnis in /public_html/blog/
weiter. Meine Zielseite befindet sich unter www.lupinedream.com
, die auf zwei verschiedene Subdomains verweist, aus denen Sie auswählen können: forums
und blog
. Mit dieser Information ist hier die Frage..htaccess und WordPress
Was die richtige ist .htaccess
Konfiguration automatisch zu übermitteln alle Anforderungen (einschließlich auch, GET
, POST
, PUT
, ... etc. gerichtet an http://www.lupinedream.com/blog
-blog.lupinedream.com
?
Grund, den ich gefragt habe, weil Wordpress ist fragt nach Site URL
und WordPress URL
in Einstellungen -> Allgemein WordPress in einem Unterverzeichnis installiert werden, aber ich habe seltsames Verhalten, wenn ich meine aktuelle Konfiguration (defekte Bilder, GET und POST nicht funktioniert), wenn WordPress versucht intern Punkt Anfragen an http://www.lupinedream.com/blog/
. In der Adressleiste Ich merke, dass meine URL ebenfalls auf Foobar geht.
Config:
/public_html/.htaccess
:
Options ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch -Indexes
## File Type Specifications
AddType text/html .html .htm .xml
AddType text/plain .txt .text .doc .md .nfo .info
<IfModule mod_cgi.c>
AddHandler cgi-script .cgi .pl .py .jsp .asp .shtml .sh
AddType cgi-script .cgi .pl .py .jsp .asp .shtml .sh
</IfModule>
<iFModule mod_php.c>
AddHandler application/x-httpd-php70 .php .php3 .php4 .php5 .php53 .phtml .tpl .html
AddType application/x-httpd-php70 .php .php3 .php4 .php5 .php53 .phtml .tpl .html
</IfModule>
DirectoryIndex index.html index.php under_construction.html
## Query limits
<Limit GET POST>
Order deny,allow
Deny from All
Allow from All
</Limit>
<Limit PUT DELETE>
Order deny,allow
Deny from All
Allow from localhost
</Limit>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
/public_html/blog/.htaccess
:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
Wordpress Einstellungen> Allgemein:
Site URL
: http://www.lupinedream.com/
WordPress URL
: http://blog.lupinedream.com/
Ich habe das Subdomain Beispiel hier: [link] (https://codex.wordpress.org/htaccess), aber die Weiterleitung scheint nicht zu funktionieren. Wenn ich zu "blog.example.com" gehe, kann ich Seitenquelle sehen. Alles mit blog.example.com hat zwei "//" davor in href, wenn von "http: // www.example.com/blog" zugegriffen wird. Dies scheint auch externe Links zu beeinflussen, wie Google. –
Ja, aber deine Wordpress-Seite lebt unter '/ blog', oder? Und Sie haben dieses Snippet bereits in '/ blog/.htaccess'. –
Haben Sie die Rewrite-Regel in '/ public_html/.htaccess' gesetzt? –