• James-Taylor

    (@james-taylor-1)


    Hi everyone, this is my first post having been using WP for a few months now… it’s not directly about WP as i’ve been able to overcome everything else on the learning curve by a bit of searching!

    I am hoping for some help creating a .htaccess file / mod_rewrite rule to change the urls which are being displayed on a site which has just gone live.

    The current .htaccess file contains:

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

    I need to add to this / amend this so that urls which currently show as https://79.170.44.91/sportsuk.org.uk/olympic-lessons/organising-committee/ display as https://www.sportsuk.org.uk/olympic-lessons/organising-committee/

    Unfortunately my knowledge of mod_rewrite / .htaccess is limited so i’m hoping someone can help me out!

    As a bit of background to the problem to date I have developed a WP site which is working correctly, it’s live and installed in a sub folder of the main website. It can be seen https://www.sportsuk.org.uk/olympic-lessons/. When you click on the page links the domain displays the physical address rather than the domain https://www.sportsuk.org.uk/&#8230;

    The domain for this site is held by a 3rd party and the WP files are hosted via my server (HeartInternet). The 3rd party has set up a redirect on their server / the domain to point at the physical address of my server and the only way we can get the site functioning correctly is to have the WP DB populated with urls pointing to the physcial address (79.170.44.91/olympic-lessons/…). If I change everything in the DB to https://www.sportsuk.org.uk/olympic-lessons/&#8230; it is causing the site to fail??

    After spending almost three days now going back and forth with the 3rd party we seem to have got as far we can, although the site works the resulting urls aren’t correct as they show the physical address as opposed to the domain name.

    The 3rd party doesn’t want to release the domain to me as they provide other services on the domain and to make matters worse they can’t provide me with access to the server to manage a DB etc so we are at a bit of a stand off!

    I’m now figuring that we are so close that a mod_rewrite rule could be the answer and everyone will be happy!

    All halp is much appreciated!

    Thanks

  • The topic ‘mod_rewrite help’ is closed to new replies.