You need a vhost for the subdomain that redirects to public_html/sub_domain_folder instead of trying to redirect with .htaccess. You can then do a www redirect in public_html/sub_domain_folder/.htaccess.
There should be some option in cpanel when creating the subdomain do specify which folder it directs to if you don’t have direct access to your vhost.
Related Posts:
- Custom permalink structure with %postname% in front of domain name
- 301 Redirects for Changed Permalink Structure & Category Base
- How do I turn off 301 redirecting posts (not canonical)?
- Subdomains to pages
- Passing variables through permalink structure
- htaccess or redirect to cloak portion of a link?
- Auto 301 to full post permalink? (using /posts/%post_id%/%postname%)
- Using WP rather than .htaccess to redirect pages/posts
- .htaccess – Redirect duplicated post ended in ‘-number/’ to the same url without the -number/
- WordPress redirection problem after moving to a new server?
- Specific URL Rewriting with parameters in wordpress
- If I change permalink structures, can I use htaccess to permanantly redirect links?
- Redirect parent taxonomy to it’s child
- Need Help Correct Regular Expression Redirect Code
- Custom Permalink
- WordPress Sub domain
- Redirect a Blogger Page URL to wordpress
- Redirecting all posts after changing URL structure with htaccess
- Redirect all posts permalinks from “.html” to “/”
- WordPress 4.4 old permalink redirect
- Htaccess https 301 problem
- What causes /pages/ to appear in URI, and how to remove it?
- Some Pemalink problems, probably caused by wrong .htaccess configuration?
- Test site pages go to main site
- Comment author url link is wrong? How to change from authors/ to author/
- change WordPress permalinks and redirect new urls 301
- Configuring Home Page Address
- Can’t access WordPress site in subfolder possibly because of .htaccess redirect from root installation?
- Removed and Reinstalled WordPress, Redirect Broken now
- redirect old pages by .htaccess
- Why are all pages redirecting to homepage when using custom permalinks?
- .htaccess regex for redirect subdomain to root domain & redirect old permalinks
- 404 posts error after 301 redirection of changed category / tag base
- 301 Redirect posts to newly added categories
- Mapping Domains to Permalinks (not multisite)
- Setting up WordPress with Custom Permalinks and no .htaccess File?
- + Character in permalink
- WordPress on a subdirectory of Laravel – WordPress pretty permalinks inner page shows laravel
- Permalink redirection from ‘Day and name’ to ‘Post name’
- Nicest way to 301 Redirect traffic when changing permalink settings
- Redirect short-form URL to long-form URL (post_id to post_id + post_name)
- Move WordPress site from one domain to another
- removing index.php IIS 7.5 webconfig
- Stop redirecting to posts not in a category / duplicate slugs
- Redirect old permalinks with Month and name to Post name on new site
- Sub-subdomain getting redirected to main domain
- How to 301 all posts
- WordPress within specific sub-directories, implicitly not root
- Get canonical link
- Problems redirecting to “pretty” permalinks (wordpress in Subdirectory)
- .htaccess file missing from WordPress install directory
- Why does chrome keep downloading a file instead of running the site?
- forward domain name to particular page?
- WordPress 404 in development area
- Does rename of page slugs create 301 redirects from old slug to new (same as for posts)?
- Change in permalink structure made javascript cookie not work correctly
- Change permalinks on move from one site to another
- Redirects after permalink change
- Page preview is shown, updating page gives 404 error
- How to 301 redirect from one url to another properly
- Multisite Redirection to new domains
- Passing the JQuery string to Worldpress URL
- An other permalink problem – 404 Error
- WordPress 3.1 .htaccess contents keep dissappearing?
- Freeze child page URLs so parent permalink changes don’t give 404s?
- WordPress permalink, stop redirection
- Old site posts broken after domain update
- Redirect From Url To Url
- After cloning WP do a subdirectory, I can’t access it
- Changing permalink structure and domain
- Arabic permalink redirect to home page
- WordPress Page Not Found if Permalink Settings is Postname
- Problems with permalinks (.htaccess not working)
- old permalinks not found
- What would cause a 500 Server Error with permalinks turned OFF?
- Subdomains pointing to a permalink URL
- Change author permalink using htaccess?
- Change url of page according to my requirements in wordpress
- Can’t login to WordPress admin panel after changing domain to use WordPress pages as a fallback from React
- How to redirect old permalinks from https://exmaple.com/category/post_id to https://exmaple.com/category/post_id.html
- corrupted URLs – can’t leave starting page
- 301 redirects after changing permalinks
- Permalink issue with WordPress Site at domain root and another WordPress Site in a Subfolder
- redirect any category in URL to the ID and post-name only – hundreds of pages affected
- wordpress admin panel loop on nginx
- WordPress All pages but home simply read “hello”
- Post redirected to page with same name but DIFFERENT permalink
- Post permalinks go to the home page
- WordPress pages break with custom permalink settings (theme directory not output)
- redirect 301 with special character like WIX site “#!”
- How to rewrite a folder in WordPress?
- LetsEncrypt WordPress on the Raspberry Pi – Nice url’s give 404 with https, http works
- On IIS, stop WordPress from resaving my web.config file when I enter the Permalinks config page
- changing permalink gives 404 error for old links
- Fresh wordpress installation in sub-directory not accessible
- Folder Name and Category Name WordPress
- .htaccess not working in WordPress
- Pretty Permalinks cause site to crash on main domain
- htaccess strip url
- WordPress not remembering old slugs for pages