简体   繁体   中英

.htaccess hide subfolder url in wordpress

I've WordPress site with the URL : http://thelaptopsolutions.in/Laptop%20Solution/

This is working fine but the URL now shows http://thelaptopsolutions.in/Laptop%20Solution/ but I want it to show http://thelaptopsolutions.in

Here's my current htaccess code

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

# END WordPress

Thanks in advance..

I advice you against messing up the contents of the .htaccess file. Revert the changes that you've made to this file and follow the simple procedue.

  1. Login to the admin dashboard.
  2. Go to Settings > General
  3. In the WordPress Address (URL) field type http://www.example.com/site
  4. In the Site Address (URL) field type http://www.example.com

Save the changes and you should be good to go.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM