protection
French 
CrawlTrack, webmaster dashboard.
Web analytic, SEO and protection

CrawlProtect, your website safety.
Reinforced protection

Two php/MySQL scripts, free and easy to install
The tools you need to manage and keep control of your site.





diable

CrawlTrack and CrawlProtect support forum

You are not logged in.


#1 15-11-2012 22:07:24

dragon013
Nouveau membre
Registered: 12-11-2012
Posts: 8

htaccess stored in wrong place

Hello,

I have the following problem:

I have a website located in ~/htdocs/websites/website1

There I created the folder crawlprotect, so it could be found at the path ~/htdocs/websites/website1/crawlprotect

Then I created my htaccess file and pushed "put the file". It was put but not in ~/htdocs/websites/website1 but in ~/htdocs/ . It might be because of the fact that the document root of all my domains it ~/htdocs/ , I think. Am I right ? If so, how to solve the issue and teach crawlprotect to write the htaccess file into the right directory ?

Thanks for any help.

Dragon.

Offline

 

#2 15-11-2012 22:41:05

Jidébé
Administrateur
Registered: 30-10-2005
Posts: 2919

Re: htaccess stored in wrong place

Hi,

You will have to modify the createhtaccess.php file, on line 1568 you have:

Code:

$filename=$_SERVER['DOCUMENT_ROOT']."/.htaccess;"

You can modify it like that:

Code:

$filename=$_SERVER['DOCUMENT_ROOT']."/websites/website1/.htaccess;"

Jean-Denis


CrawlTrack & CrawlProtect developer

Offline

 

#3 16-11-2012 20:41:09

dragon013
Nouveau membre
Registered: 12-11-2012
Posts: 8

Re: htaccess stored in wrong place

Hello,

thanks for your help. I modified the lines there in this way, to be able to use it for all my domains:

Code:

$dir = substr(__DIR__,0,strpos(__DIR__,"crawlprotect"));
$filename=$dir."/.htaccess";
$filedir=$dir;

Note: my folder I put crawlprotect in is direcly in the root of each domain and is called "crawlprotect". If someone wants to use this hack you might need to change it to the name of your folder.

It's just a workaround but it works for me.

Dragon.

Last edited by dragon013 (16-11-2012 20:43:29)

Offline

 

#4 03-01-2013 12:14:05

dragon013
Nouveau membre
Registered: 12-11-2012
Posts: 8

Re: htaccess stored in wrong place

Since I would have to do this workaround with each update, is there a chance to change the sourcecode by the dev, so that it will work for everyone ? Maybe a DB field, storing the path to htaccess ?

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB