PDA

View Full Version : Need help with .htpaccess and redirect chain


novice2010
01-29-2010, 01:48 PM
Hello Forum!

Recently I did Page Speed analysis for my home page and receive a message:

Remove the following redirect chain if possible:
• http://bar-navig.yandex.ru/favicon.ico
• http://www.yandex.ru/

I’m not knowledgable in web developing, so don’t know where to start. My first guess was that I should look at .htpaccess file on the server, but I don’t know how to do so. I looked at .htpaccess file in my web page directory (on my pc) and this was what I saw there:

php_value magic_quotes_gpc 1
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*)-(.*)-(.*)\.html$ /index2.php?item_id=$1&pg=$2&kw=$3

Can anyone tell me what this all means and whether it should or should not be there? Someone helped me to create a web page, and I’m not sure if he did everything correctly. Could you help me please?

hoothelp
03-10-2010, 06:16 AM
Hello!

The htaccess file looks fine - don't think that's your problem.

I'm guessing there's a javascript file or something similar doing an include from yandex.ru and that's what's actually getting flagged.

If you're able to do a find on the web server directly - either through RDP on Windows or SSH on Linux - execute one for 'yandex.ru'.

Another possibility is that there's some other .htaccess file you're missing (in a subdirectory somewhere). The find should catch it.

- C. Aaron Smith

novice2010
03-12-2010, 12:00 PM
Thanks, Aaron! Can you please explain how to do a find on the server with RDP? I have no idea what it is.
Respectfully,
novice2010

hoothelp
03-12-2010, 08:44 PM
Hello again,

RDP stands for Remote Desktop Protocol. It's the shorthand way of talking about connecting to a Windows desktop of a remote computer. The Windows Server line usually calls this Terminal Services. Another remote connection option that you might have is VNC.

Can you tell us more about the server which is serving the web content? Is it a server you manage personally, or a server with a web hosting provider?

If you have no direct affiliation with yandex.ru, then it sounds to me like your site was exploited (either with XSS - cross site scripting - or by manipulating a file upload script). You need to search the contents of every file on your web site and find where the include to yandex.ru is occurring. This is most easily done directly on the web server, but if that is not an option, you can always download a fresh copy of the entire web site and search the content locally.

- C. Aaron Smith

novice2010
03-14-2010, 08:56 PM
Thanks Aaron!
It's a server with a web hosting provider. Can I use the Dreamweaver to find "yandex.ru" in the website files that are on my computer? But I'm afraid the "yandex.ru" might be in the files stored on the server, then I don't know how to do the search there. I also have a database on the server, in which the dynamic pages of my website are stored.

Respectfully.
novice2010