I have a page which is called /home and I would like to make my .htaccess redirect it to /homepage which is the actual page that I want to show.

My .htaccess has the following:

# Switch rewrite engine off in case this was installed under HostPay.
RewriteEngine Off


DirectoryIndex index.cgi index.php

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

# END WordPress

What do I have to add whenever a user tries to go to http://example.com/ to redirect them at http://example.com/homepage?

  • Why not just set this page as the front page through WordPress Settings? See Creating a Static Front Page
    – 99teko
    Aug 21 '16 at 10:34
  • @OmarSoliman hey man, i tried but the theme must have some settings that i can't see and it still shows the "Home" page.... Aug 21 '16 at 11:26

Add the following to your .htaccess, in between the <IfModule mod_rewrite.c>:

RedirectMatch 301 /home /homepage
Redirect 301 / /homepage

However, as Omar suggested, you can change your homepage through your [dashboard] by doing the following:

  • Go to Settings > Reading
  • Under Front page displays, select A static page (select below)
  • Next to Front page: select the page for your new homepage from the dropdown menu
  • Click Save Changes

Change the front page settings in WordPress

  • Yeap that worked. Although as i told Omar i made this change with no luck.. that's why i asked for htaccess :D Aug 21 '16 at 11:26
  • I see. Sounds like there may be a plugin that is interfering, I'd disable each one and narrow it down. Aug 21 '16 at 11:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.