Directory URL problem

Discussion in 'HTML & Website Design' started by johneva, Dec 17, 2007.

  1. #1
    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.

    www.john-eva.co.uk/dir

    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.

    RewriteEngine on
    
    RewriteCond %{HTTP_HOST} ^([^.]+\.co.uk) [NC] 
    
    RewriteRule (.*) http://www.%1/$1 [R=301,L]
    
    
    Code (markup):
    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.

    Oh I understand this probley is the wrong forum but was unsure just where to put it, the problem is with a PHP directory but I think the problem is with a htaccess file, I think.

    Cheers

    Edit
    Dont worry fixed.
     
    johneva, Dec 17, 2007 IP