I have the following ruleset in my .htaccess file which basically rewrites my php pages and makes them appear as subfolders, so for example, http://www.mysite.co.uk/about-me/
points to http://www.mysite.co.uk/about.php
:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.mysite.co.uk$ [NC]
RewriteRule ^(.*)$ http://www.mysite.co.uk/$1 [R=301,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule ^index.php$ /welcome-to-my-website/ [L,R=301,NC]
ReWriteRule ^welcome-to-my-website/$ index.php [NC,L]
ReWriteRule ^about-me/$ about.php [NC,L]
ReWriteRule ^my-portfolio/$ portfolio.php [NC,L]
ReWriteRule ^contact-us/$ contact.php [NC,L]
What I want to do is to automatically forward/redirect the root - http://www.mysite.co.uk/ - and the index.php page straight to /welcome-to-my-website/ via htaccess so that there is no duplicate content. Any idea how one may achieve this?