-1

//here is my htaccess

<IfModule mod_rewrite.c>   
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^glamestates\.co\.uk$ [NC]
    RewriteRule ^.*$ http://www.glamestates.co.uk%{REQUEST_URI} [R=301,L] # <-- Mind the 'L'!

    RewriteRule ^$ app/webroot/    [L]
    RewriteRule (.*) app/webroot/$1 [L]
</IfModule>

where about to add this google webmaster tools link in my htaccess

glamestates.co.uk/googlec7feca3a4513beef.html 

what I have got so far but this doesn't work. I added in line five

RewriteRule ^glamestates\.co\.uk\googlec7feca3a4513beef\.html$ http://www.glamestates.co.uk\googlec7feca3a4513beef.html%{REQUEST_URI} [R=301,L]

I have already put this question here since many day nobody answered

Community
  • 1
  • 1
Fury
  • 4,643
  • 5
  • 50
  • 80
  • 1
    1) 2 days does not constitute "many days", 2) perhaps you might get a response if you explain what you are trying to actually do. "add a google analytics link in my htaccess" doesn't really mean anything. Why are you trying to add it? What do you expect the rule to actually do? Give us a "before" and "after", etc.. – CrayonViolent Mar 22 '14 at 22:58
  • thank you 4 response. I need to set google analytics and SEO for this website. When I register google analytics it gives me an html file which I need to put it too root directory and it has to be accessible for google. I have put this file in root but because I am using Cakephp it blocks google. that's why I was thinking there might be a better solution to sort out this problem. I assume it should be after www rule – Fury Mar 23 '14 at 00:31

2 Answers2

0

Still not 100% clear about what you're asking, but I think perhaps you want this:

<IfModule mod_rewrite.c>   
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^glamestates\.co\.uk$ [NC]

    RewriteRule ^googlec7feca3a4513beef\.html$ $0 [L]

    RewriteRule ^.*$ http://www.glamestates.co.uk%{REQUEST_URI} [R=301,L] # <-- Mind the 'L'!

    RewriteRule ^$ app/webroot/    [L]
    RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
CrayonViolent
  • 32,111
  • 5
  • 56
  • 79
  • doesn't work. How about this? #RewriteRule ^glamestates\.co\.uk\googlec7feca3a4513beef\.html$ http://www.glamestates.co.uk\googlec7feca3a4513beef.html%{REQUEST_URI} [L] – Fury Mar 23 '14 at 01:20
  • Thank you again @Crayon Violent for your time buddy – Fury Mar 23 '14 at 01:57
0

just need to paste the googlec7feca3a4513beef.html file into Webroot folder rather than Root

Fury
  • 4,643
  • 5
  • 50
  • 80