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 http://79.170.44.91/sportsuk.org.uk/olympic-lessons/organising-committee/ display as http://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 http://www.sportsuk.org.uk/olympic-lessons/. When you click on the page links the domain displays the physical address rather than the domain http://www.sportsuk.org.uk/…
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 http://www.sportsuk.org.uk/olympic-lessons/… 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.
I have set the site up entirely on my systems using a spare domain which I have, without any rewrites from the 3rd party etc. and can get the site working perfectly straight away in the scenario… unfortunately this was only to prove a point and ultimately the site has to work correctly on the right domain.
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!
Any help would be much appreciated! (I have also posted a thead over on the WP forums to same effect as this in an attempt to resolve this as soon as possible!)
Thanks