Posts: 139
Location: Stafford, England
|
Hi
I have not done much with directorys and wanted to have bit of a play around just to get used to them aswell as I thought it may help me improve traffic and inbound links for my personal site.
Thing is I had set it up so all requests for pages on my site always went to the www. version of the URL for SEO perpouses, to lower the chance of having some sites link to the www. and some the non www.
I used this short bit of code I got from somebody in my htaccess files.
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^([^.]+\.co.uk) [NC]
RewriteRule (.*) http://www.%1/$1 [R=301,L]
But the problem is my directory I just added does not seem to care about this rule, I assume it is cos it has its own htaccess file it simpley does not care what the other one says, so I tryed the short bit of code to find all that does is redirect requests to the main sites index page.
Can anybody help me get my directory to run on the www. version instead of the non www. version please.
Cheers
EDIT
Right now I am confused I have managed to get all the links within the directory pointing to the www. version though changing something in the header.php php which contains all the variables, but when you try to go to http://www.john-eva.co.uk/dir/ it still takes you to the non ww. version and I carnt get my main website to send you to the www. version.
EDIT
Ahwell dont ask me how cos I dont know (To much beer) but its fixed I got it working as I wanted.
Last edited by johneva; 12-17-2007 at 09:38 PM..
|