2016-05-20 24 views
0

Ich habe Wordpress in Unterordner verschoben namens ‚Standort‘, aber die URL zeigt nun http://www.example.com/site entfernen, aber ich will es ohne die mein aktueller .htaccess-Code /site/Unterordner Namen von Wordpress Website mit .htaccess

Hier zeigt

RewriteEngine On 
RewriteBase /site/ 
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /site/index.php [L] 

Bitte helfen Sie mir.

Vielen Dank im Voraus

Antwort

0

ich Rat, den Sie gegen verwirren den Inhalt der .htaccess-Datei auf. Nehmen Sie die Änderungen, die Sie an dieser Datei vorgenommen haben, erneut vor und folgen Sie den einfachen Anweisungen.

  1. Melden Sie sich am Admin-Dashboard an.
  2. Gehen Sie zu Einstellungen> Allgemein
  3. In dem Wordpress-Adresse (URL) Feldtyp http://www.example.com/site
  4. in Site-Adresse (URL) Feldtyp http://www.example.com

die Änderungen speichern und Sie sollten gut gehen .

0

Versuchen Sie wie folgt vorgehen: -

1)Create the new location for the core WordPress files to be stored (we will use /wordpress in our examples). (On linux, use mkdir wordpress from your www directory. You'll probably want to use "chown apache:apache" on the wordpress directory you created.) 
2) Go to the General panel. 
3) In the box for WordPress address (URL): change the address to the new location of your main WordPress core files. Example: http://example.com/wordpress 
4) In the box for Site address (URL): change the address to the root directory's URL. Example: http://example.com 
5) Move your WordPress core files to the new location (WordPress address). 
6) Copy (NOT MOVE!) the index.php and .htaccess files from the WordPress directory into the root directory of your site (Blog address). The .htaccess file is invisible, so you may have to set your FTP client to show hidden files. If you are not using pretty permalinks, then you may not have a .htaccess file. If you are running WordPress on a Windows (IIS) server and are using pretty permalinks, you'll have a web.config rather than a .htaccess file in your WordPress directory. For the index.php file the instructions remain the same, copy (don't move) the index.php file to your root directory. The web.config file, must be treated differently than the .htaccess file so you must MOVE (DON'T COPY) the web.config file to your root directory. 
7) go to index.php.... Change the following and save the file. Change the line that says: 
require(dirname(__FILE__) . '/wp-blog-header.php'); 

auf die folgenden, mit Ihrem Verzeichnisnamen für die Wordpress Core-Dateien:

require(dirname(__FILE__) . '/wordpress/wp-blog-header.php'); 
0

Nach Giving WordPress Its Own Directory im Codex, ist es das, was Sie brauchen (funktioniert bei mir).

erstellen .htaccess Datei im Stammordner, und setzt diesen innerhalb Inhalt (nur example.com ändern und my_subdir):

<IfModule mod_rewrite.c> 
RewriteEngine on 
RewriteCond %{HTTP_HOST} ^(www.)?example.com$ 
RewriteCond %{REQUEST_URI} !^/my_subdir/ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /my_subdir/$1 
RewriteCond %{HTTP_HOST} ^(www.)?example.com$ 
RewriteRule ^(/)?$ my_subdir/index.php [L] 
</IfModule> 

Dort finden Sie auch eine Anleitung finden, es zu tun, indem Sie die URL zu ändern in die Allgemeinen Einstellungen, die Sie ebenfalls benötigen, um .htaccess und index.php zu kopieren und diese zuletzt zu bearbeiten. Die erste Methode scheint einfacher.

Verwandte Themen