• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Redirection in PHP Code

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Redirection in PHP Code

This topic is: not resolved
  • This topic has 8 replies, 3 voices, and was last updated 11 years ago by Tonje.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • January 12, 2015 at 12:09 am #137137
    Tonje
    Member

    Hello,
    We realized that our site is really really slow. We did a few things that helped improving it, one was to deinstall W3 Total Cache and install WP Super Cache instead. That was a recommendation from our Web host. Amazing how that improved.

    Another recommendation from the web host was a default PHP code in WordPress that is forwarded http://iexcelbooks.no/ to http://www.iexcelbooks.no/. They say that the issue is software we have installed, which mean WP i guess. "We recommend that you do not do forwarding in this way, if you do not want it to stand http://iexcelbooks.no/ address field, you should ensure that no redirection in PHP code". As this is "over my head" we had someone to look at it, but could only find redirection from older version of wordpress and not the current we use.

    Anyone out there who can advice us how to move forward with this issue? Is it a known problem?

    Happy for advice and/or to get in touch with an expert

    Thanks

    http://iexcelbooks.no
    January 12, 2015 at 1:49 am #137139
    Brad Dalton
    Participant

    Did you try .htaccess redirects?


    Tutorials for StudioPress Themes.

    January 12, 2015 at 2:14 am #137140
    Tonje
    Member

    Thanks for the reply. Someone told me that that might not be the right thing to do. I wonder how i know...?
    Might not be harmfull to try..?

    January 12, 2015 at 9:57 am #137176
    Badlywired
    Member

    If it is a slow overloaded shared server without any PHP caching then the PHP redirect could be a factor.

    You should check out http://www.webpagetest.org to analyse what is slow. However, normally slow hosts are the biggest issue and can be solved by paying more for your service.


    My techy blog WordPress and stuff badlywired.com

    January 14, 2015 at 12:03 am #137384
    Tonje
    Member

    Thanks for your reply. I actually can not see or know if we need a php redirect. I can not find out if that is the issue in the webpagetest either. The host is blaming wp for a redirect and not themselves.

    January 14, 2015 at 2:19 am #137392
    Badlywired
    Member

    Yes, they are correct, WordPress will internally redirect http://www.mydomain.com to mydomain.com or visa versa using PHP based on the URL settings in general>settings (or wp-config.php).

    The redirect is very important for SEO purposes otherwise you have in effect 2 SEPARATE websites with the same content, http://www.mydomain.com is a different sub domain to mydomain.com.

    To avoid this PHP redirect, add the redirect to your .htaccess (there are tons of examples / how to do it on Google )

    Apply the .htaccess redirect

    Then your host won't be able to claim then that is an issue, but I doubt it will really improve speed, but it is one less excuse from your host.


    My techy blog WordPress and stuff badlywired.com

    January 18, 2015 at 6:25 am #137846
    Tonje
    Member

    Thanks for your advices. We did redirect to .htaccess. You were right Badlyweird...It did not really improve the speed. I guess the only thing now is to get back to the host an complained that "they" are the issues and need to be solved. ?

    Thanks

    Tonje

    January 18, 2015 at 6:43 am #137847
    Badlywired
    Member

    Although you say you realised your site is slow, when using it (from London UK) it certainly doesn't feel slow.

    And if you are paying only 30 Krone a month, for shared hosting (about USD 3.50) then the host is reasonable.

    There are things you can do see
    https://developers.google.com/speed/pagespeed/insights/
    and
    http://gtmetrix.com/reports/www.iexcelbooks.no/byuLZ21i
    for some ideas

    Simplest thing to do is implement browser caching. I'll write a blog post on my blog and link it up.

    -- edit--
    Here it is http://badlywired.com/2015/01/speed-wordpress-website/


    My techy blog WordPress and stuff badlywired.com

    January 19, 2015 at 11:27 pm #138013
    Tonje
    Member

    Thanks a lot. I will definitely read your blog in a few.

    Thank you also for testing our page.

    The Domenehost said there were a few issues on our website that slows down our site:

    Google APIs (fonts)
    Google Analytics (sets cookies)
    Facebook (set cookies!)

    admin-ajax.php (local)

    I wonder if they actually mean that i need to remove or replace with other plugins? We just remove an iframe facebook to make it faster, with just a link, google analytics we need but is there another ways to set it up maybe?

    I read a little bit about the admin-ajax but that is already included in the wordpress i believe, so how can that be solved?

    Thanks a lot.

  • Author
    Posts
Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble