This is possible, and it actually should be very easy for you to do.
There are lots of ways that you could have this setup, depending on if your server is using cPanel, Plesk, etc. At its most basic, right now, your Apache virtual host points to your main web directory, maybe something like /var/www/
, and you have your htaccess file routing the domain to a subdirectory of that. What you need to do is change your virtual host to point to the directory in which WordPress actually resides instead of its parent directory. You’ll want it to look something like this:
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/var/www/sample"
ServerName sample.com
ServerAlias *.sample.com
</VirtualHost>
How you do that will depend on your server’s software if applicable. If you don’t feel comfortable making changes to your server config, you should consult your web host and I’m sure they’d be happy to make this edit for you.
Cheers~
Related Posts:
- Create rewriterules for different domains in htaccess file with WP multisite
- Canonical Resource URLs Across a Multisite Network 2012?
- How to Deny Access to No Referrer Requests on Multiste with Mapped domains
- VServer/Rootserver/Shared Hosting: Multiple WordPress installations each having their unique domain?
- WordPress Multisite and how to apply sef urls only to specific sites
- Multisite htaccess with domain rewrites
- Remove subdirectory from links
- In a subdomain network, what .htaccess settings can I use to have WP ignore requests to one subdomain?
- adding rewrite rules in .htaccess
- Plugin to edit htaccess file
- Serve apache 404 for missing assets rather then wp 404 template WP_Rewrites
- W3 Total Cache Plugin with WP 3 MultiUser [closed]
- Protect Uploads in Multisite
- Permalinks not working on second wordpress installed in a subdirect
- Fix 403 error on WordPress multisite network using subdomains
- W3 Total Cache – How to disable “Performance” menu under multisite? [closed]
- Change wp-content without changing the name of the folder
- Multisite without .htaccess
- How to restrict access to wp-content, wp-includes and all sub-folders
- Is it possible to dynamically redirect URL using htaccess?
- Which WordPress scripts need to be executable for a fresh installation?
- Keep getting 401 error from WordPress on AWS Lightsail
- Setup Permanent 301 Redirects after moving to Https [closed]
- Force www to non-www on a subdomain in WordPress?
- WordPress multilingual website domain and folders
- WordPress MU Domain Mapping Customizer Error
- WP site URL changed to have HTTPS but still homepage does not redirect
- How to properly force https and www on multisite with Apache HTAccess
- How to exclude a directory from WordPress permalinks in a Multisite environment?
- Map alt domain to specific section of website w/o MU
- need a help for modify .htaccess rule [closed]
- .htaccess ‘down for maitenance’ and WordPress
- Which is better: 301 Redirect in my .htaccess file or a plugin like Redirection?
- How can i redirect one url to another url using .htaccess or add_rewrite_rule
- When is it necessary to have Header unset Vary in .htaccess
- Redirect http to https does not work on subdir where another instance of WordPress installed
- redirect the homepage using .htaccess outside of WordPress
- Https Redirect infinite loop in Mobile browsers
- 403 error on admin login page
- Redirect only posts to New Domain
- add_rewrite_rule on multisite doesn’t work
- Redirect an old link to new site homepage [closed]
- .htaccess rewriting old RSS feed URL to WordPress feed URL
- How can I set Cache TTL for woff and woff2 font files with htaccess?
- How can I fix the redirect chain after implementing ssl on wordpress?
- WordPress multisite .htaccess causes 500 error on old *.php URLs
- How do I configure wordpress structure for development using git and composer
- Multisite Redirection to new domains
- Mapping domains to WordPress network installed on subdomain
- One WordPress Installation for 2 Domains
- How to create a redirect in the .htaccess file, with 2 exceptions
- My Homepage Suddenly Disappeared and I Can’t Get It Back
- WordPress: how to change URL for individual MultiSites?
- Login problems on multisite installation with different domains
- Is this a job for WP MultiSite with domain mapping plugin?
- How to turn this .htaccess rule into a dynamic rule with add_rewrite_rule, et al?
- Disable directory browsing of uploads folder
- Domain Mapping for WordPress MU and https redirection – How to?
- Multisite domain mapping breaks CSS
- Local PC cache stays filled with old WordPress Site data
- WordPress MU subdomain vhost
- How to have a custom URI path for specific page template
- Domain mapping with Multisite links are wrong
- .htaccess Non-‘www’ to ‘www’ Subdomain Redirection Only Works for Homepage
- WordPress JSON API restrict to specific domain
- Where to put W3 Total Cache rewrite rules in .htaccess? [closed]
- Install multisite wordpress on a subdomain and map to top level domains
- Rewrite Rules not redirecting rewrite
- WordPress multisite with domains and subdomains
- How do i allow access to a single file in my root directory? [closed]
- Working with Reverse Proxies and Multisite Installation
- Selectively Disabling PHP via .htaccess in Root Directory
- Folder structure when using multiple domains with WordPress
- What’s the best way to manage a lot of 301 redirects in WordPress?
- Shared hosting, multiple sites, can’t log in to WP due to .htaccess redirection
- What causes 404 errors that forces you to rebuild a .htaccess file?
- How to fix redirection of Post/Page of wordpress inside the wordpress?
- How to set up MS Exchange Autodiscover alongside WordPress
- Migrating from domain mapping plugin to native domain mapping
- Xampp is not loading media
- PHP application in sub directory keeps redirecting to main site
- Blocking wp-login in HTACCESS has also blocked password protected pages
- Add file at the root of mapped domain in multisite
- execute cron jobs when .htaccess login protected?
- Redirect WordPress site to a landing (construction) page using htaccess, with access to /wp-admin and /invoice
- change URIs of migrated site
- Update javascript URL in header – Domain Mapping Plugin [closed]
- WordPress Multisite with cPanel Addon Domains and SSL
- htaccess- to hide subdirectory slug only from the post
- Subfolder renaming
- Steps for WordPress over SSL
- Fixing Access-Control-Allow-Origin (CORS origin) for multiple subdomains
- insert_with_markers() WordPress & htaccess help
- WordPress login bug. Need an emergency solution
- Cannot find webarh/malware redirect infection that only shows on Chrome
- Are there any hosting companies that are already setup and configured for TLD domain mapping?
- WordPress Media Library rendering blank image tiles
- Subfolder install not working
- Redirect loops in Bing holding my sites back
- Permalinks not working on debian with OVH