WordPress and log files

apps

#1

I am running WordPress on one of my sites, and I have search engine “friendly” URLs turned on. But–now I can’t access the website logs (www.myurl.com/stats) because it looks like WordPress takes over any URL you type.

Does anyone know how to work around this so I can see my log files?

Thanks!


#2

You will need to make a small change to your .htaccess file, as detailed in the wiki article linked below;

http://www.wiki.dreamhost.com/index.php/Making_stats_accessible_with_htaccess

Mark


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)


#3

Fantastico! It worked. Thanks very much for the info.


#4

No problem, I am glad I could be of assistance.

Mark


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)


#5

When I follow the instructions and place the code that is linked on that page into my htaccess file, I get a 500 Internal Server error when trying to access any file or directory that ISN’T my /stats page!

This is what my htaccess reads:

RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/(stats|failed_auth\.html)/?(.*)$ [NC] RewriteRule ^.*$ - [L] # BEGIN WordPress RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress

#6

I just copied/pasted the .htaccess file you posted and uploaded it to my son’s WordPress blog and it behaved exactly as it should, no 500 server errors on accessing stats or normal blog pages.

I can only think that the file was somehow ‘messed up’ during editing or uploading. This is not uncommon due to differences in the way some editors on certain operating systems treat CR/LF characters at the end of lines.

You need to upload the .htaccess file in ASCII mode, or create/edit the file using one of the existing editors on your server. Another option would be to run the dos2unix command in the shell to fix any CR/LF problems.

Running the shell command below from within the domain web-directory might fix the issue.

dos2unix .htaccess

Mark


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)


#7

Also, in addition to what Mark suggested, make sure you have that .htaccess file in the correct directory (the one that is the “base” of your WordPress install).

–rlparker


#8

I will try to download the file and reupload it in ASCII mode. I was editing on the serverside with an editor in my FTP program, so it may have been converting it to unicode.

I’ll give it a try and see.

Thank you for your response.