Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

Is it possible to redirect the homepage only?

         

Gemini23

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

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



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.

TorontoBoy

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

5+ Year Member Top Contributors Of The Month



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.

Gemini23

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

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



Thanks - not sure if a static front page can be to a sub-domain?

robzilla

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

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



You probably have an .htaccess file in the root folder. You could add:
RewriteRule ^$ http://subdomain.example.com/ [R=301,L]

not2easy

4:42 pm on Mar 13, 2019 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



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...]

robzilla

6:20 pm on Mar 13, 2019 (gmt 0)

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



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.