Welcome to WebmasterWorld Guest from 3.85.245.126

Forum Moderators: rogerd & travelin cat

Is it possible to redirect the homepage only?

     
3:21 pm on Mar 13, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Aug 30, 2007
posts: 693
votes: 6


Perhaps not just a Wordpress issue but this is on a Wordpress site...

Without going into the reasons..

is it possible to redirect ONLY the home page and NOT other urls?

and to redirect to a sub-domain on the domain.
3:36 pm on Mar 13, 2019 (gmt 0)

Preferred Member from CA 

Top Contributors Of The Month

joined:Feb 7, 2017
posts:576
votes: 59


Odd request. You could try creating a page, not a post, as a static home page, and do the redirect from there. Set your theme's front page to that static page. It seems possible.
3:42 pm on Mar 13, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Aug 30, 2007
posts: 693
votes: 6


Thanks - not sure if a static front page can be to a sub-domain?
3:44 pm on Mar 13, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Sept 25, 2005
posts:2091
votes: 370


You probably have an .htaccess file in the root folder. You could add:
RewriteRule ^$ http://subdomain.example.com/ [R=301,L]
4:42 pm on Mar 13, 2019 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
posts:4527
votes: 350


WordPress will only show where the Settings (Admin > Settings > General - to configure the location) tell it to show and though you can 'pretend' to be in a subdomain, it is all or nothing because it runs on the settings. The URLs are generated according to the settings. To have it show on the domains 'home page' you need to set it up that way and add the index.php file to the root directory.

The complete instructions are here: [webmasterworld.com...]
6:20 pm on Mar 13, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Sept 25, 2005
posts:2091
votes: 370


I've assumed the subdomain is separate from the WordPress site.

As an alternative to my earlier post, there's also a bunch of redirection plug-ins you could use to achieve the same effect.