Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Deedle

    (@deedle)

    I know that the previous dev installed redirection and isecurity on the theme I’m pretty sure both of those have an affect on the htaccess file.

    Thread Starter Deedle

    (@deedle)

    SOLVED!

    Hi Ross,

    So I decided to rebuild the theme locally one file at a time, inside the functions.php file was two lines updating the siteurl and home options to the website. I’ve since deleted those lines and everything is running smoothly.

    Thanks for the help and patience.

    Cheers.

    Thread Starter Deedle

    (@deedle)

    I never added those, they previous dev did, I haven’t touched the website yet because I don’t have a local copy running to demo changes.

    I’ll delete the old htaccess file and generate a new one and try to disable those plugins.

    Thread Starter Deedle

    (@deedle)

    ## EXPIRES CACHING ##
    <IfModule mod_expires.c>
    ExpiresActive on
    ExpiresByType text/css "access plus 14 days"
    ExpiresByType text/xml "access plus 0 seconds"
    ExpiresByType text/javascript "access plus 14 days"
    ExpiresByType application/x-javascript "access plus 14 days"
    ExpiresByType image/ico "access plus 14 days"
    ExpiresByType image/jpg "access plus 14 days"
    ExpiresByType image/jpeg "access plus 14 days"
    ExpiresByType image/gif "access plus 14 days"
    ExpiresByType image/png "access plus 14 days"
    ExpiresByType image/svg+xml "access plus 1 month"
    ExpiresByType text/html "access plus 14 days"
    ExpiresByType video/ogg "access plus 1 month"
    ExpiresByType audio/ogg "access plus 1 month"
    ExpiresByType video/mp4  "access plus 1 month"
    ExpiresByType video/webm "access plus 1 month"
    ExpiresByType application/x-font-woff  "access plus 1 month"
    ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
    ExpiresByType application/xml  "access plus 0 seconds"
    ExpiresByType application/json "access plus 0 seconds"
    ExpiresByType application/rss+xml   "access plus 1 hour"
    ExpiresByType application/atom+xml  "access plus 1 hour"
    </IfModule>
    
    ## EXPIRES CACHING ##
    <FilesMatch "\\.(js|css|html|htm|php|xml)$">
    SetOutputFilter DEFLATE
    </FilesMatch>
    
    <IfModule mod_gzip.c>
    mod_gzip_on Yes
    mod_gzip_dechunk Yes
    mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
    mod_gzip_item_include handler ^cgi-script$
    mod_gzip_item_include mime ^text/.*
    mod_gzip_item_include mime ^application/x-javascript.*
    mod_gzip_item_exclude mime ^image/.*
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
    </IfModule>
    
    # compress text, html, javascript, css, xml:
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
    AddType x-font/otf .otf
    AddType x-font/ttf .ttf
    AddType x-font/eot .eot
    AddType x-font/woff .woff
    AddType image/x-icon .ico
    AddType image/png .png
    
    # BEGIN iThemes Security
    #Quick ban IP. Will be updated on next formal rules save.
    SetEnvIF REMOTE_ADDR "^157\.55\.39\.42$" DenyAccess
    SetEnvIF X-FORWARDED-FOR "^157\.55\.39\.42$" DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP "^157\.55\.39\.42$" DenyAccess
    order allow,deny
    deny from env=DenyAccess
    deny from 157.55.39.42
    allow from all
    #Quick ban IP. Will be updated on next formal rules save.
    SetEnvIF REMOTE_ADDR "^207\.46\.13\.73$" DenyAccess
    SetEnvIF X-FORWARDED-FOR "^207\.46\.13\.73$" DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP "^207\.46\.13\.73$" DenyAccess
    order allow,deny
    deny from env=DenyAccess
    deny from 207.46.13.73
    allow from all
    #Quick ban IP. Will be updated on next formal rules save.
    SetEnvIF REMOTE_ADDR "^207\.46\.13\.128$" DenyAccess
    SetEnvIF X-FORWARDED-FOR "^207\.46\.13\.128$" DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP "^207\.46\.13\.128$" DenyAccess
    order allow,deny
    deny from env=DenyAccess
    deny from 207.46.13.128
    allow from all
    #Quick ban IP. Will be updated on next formal rules save.
    SetEnvIF REMOTE_ADDR "^207\.46\.13\.71$" DenyAccess
    SetEnvIF X-FORWARDED-FOR "^207\.46\.13\.71$" DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP "^207\.46\.13\.71$" DenyAccess
    order allow,deny
    deny from env=DenyAccess
    deny from 207.46.13.71
    allow from all
    #Quick ban IP. Will be updated on next formal rules save.
    SetEnvIF REMOTE_ADDR "^157\.55\.39\.29$" DenyAccess
    SetEnvIF X-FORWARDED-FOR "^157\.55\.39\.29$" DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP "^157\.55\.39\.29$" DenyAccess
    order allow,deny
    deny from env=DenyAccess
    deny from 157.55.39.29
    allow from all
    #Quick ban IP. Will be updated on next formal rules save.
    SetEnvIF REMOTE_ADDR "^195\.154\.250\.134$" DenyAccess
    SetEnvIF X-FORWARDED-FOR "^195\.154\.250\.134$" DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP "^195\.154\.250\.134$" DenyAccess
    order allow,deny
    deny from env=DenyAccess
    deny from 195.154.250.134
    allow from all
    #Quick ban IP. Will be updated on next formal rules save.
    SetEnvIF REMOTE_ADDR "^157\.55\.39\.171$" DenyAccess
    SetEnvIF X-FORWARDED-FOR "^157\.55\.39\.171$" DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP "^157\.55\.39\.171$" DenyAccess
    order allow,deny
    deny from env=DenyAccess
    deny from 157.55.39.171
    allow from all
    #Quick ban IP. Will be updated on next formal rules save.
    SetEnvIF REMOTE_ADDR "^207\.46\.13\.9$" DenyAccess
    SetEnvIF X-FORWARDED-FOR "^207\.46\.13\.9$" DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP "^207\.46\.13\.9$" DenyAccess
    order allow,deny
    deny from env=DenyAccess
    deny from 207.46.13.9
    allow from all
    #Quick ban IP. Will be updated on next formal rules save.
    SetEnvIF REMOTE_ADDR "^207\.46\.13\.97$" DenyAccess
    SetEnvIF X-FORWARDED-FOR "^207\.46\.13\.97$" DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP "^207\.46\.13\.97$" DenyAccess
    order allow,deny
    deny from env=DenyAccess
    deny from 207.46.13.97
    allow from all
    #Quick ban IP. Will be updated on next formal rules save.
    SetEnvIF REMOTE_ADDR "^157\.55\.39\.73$" DenyAccess
    SetEnvIF X-FORWARDED-FOR "^157\.55\.39\.73$" DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP "^157\.55\.39\.73$" DenyAccess
    order allow,deny
    deny from env=DenyAccess
    deny from 157.55.39.73
    allow from all
    #Quick ban IP. Will be updated on next formal rules save.
    SetEnvIF REMOTE_ADDR "^207\.46\.13\.90$" DenyAccess
    SetEnvIF X-FORWARDED-FOR "^207\.46\.13\.90$" DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP "^207\.46\.13\.90$" DenyAccess
    order allow,deny
    deny from env=DenyAccess
    deny from 207.46.13.90
    allow from all
    #Quick ban IP. Will be updated on next formal rules save.
    SetEnvIF REMOTE_ADDR "^207\.46\.13\.116$" DenyAccess
    SetEnvIF X-FORWARDED-FOR "^207\.46\.13\.116$" DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP "^207\.46\.13\.116$" DenyAccess
    order allow,deny
    deny from env=DenyAccess
    deny from 207.46.13.116
    allow from all
    #Quick ban IP. Will be updated on next formal rules save.
    SetEnvIF REMOTE_ADDR "^157\.55\.39\.118$" DenyAccess
    SetEnvIF X-FORWARDED-FOR "^157\.55\.39\.118$" DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP "^157\.55\.39\.118$" DenyAccess
    order allow,deny
    deny from env=DenyAccess
    deny from 157.55.39.118
    allow from all
    #Quick ban IP. Will be updated on next formal rules save.
    SetEnvIF REMOTE_ADDR "^207\.46\.13\.25$" DenyAccess
    SetEnvIF X-FORWARDED-FOR "^207\.46\.13\.25$" DenyAccess
    SetEnvIF X-CLUSTER-CLIENT-IP "^207\.46\.13\.25$" DenyAccess
    order allow,deny
    deny from env=DenyAccess
    deny from 207.46.13.25
    allow from all
    	# BEGIN Hide Backend
    			# Rules to hide the dashboard
    			RewriteRule ^/wplogin/?$ /wp-login.php [QSA,L]
    
    	# END Hide Backend
    	# BEGIN Tweaks
    		# Rules to block access to WordPress specific files
    		<files .htaccess>
    			Order allow,deny
    			Deny from all
    		</files>
    		<files readme.html>
    			Order allow,deny
    			Deny from all
    		</files>
    		<files readme.txt>
    			Order allow,deny
    			Deny from all
    		</files>
    		<files install.php>
    			Order allow,deny
    			Deny from all
    		</files>
    		<files wp-config.php>
    			Order allow,deny
    			Deny from all
    		</files>
    
    		# Rules to disable XML-RPC
    		<files xmlrpc.php>
    			Order allow,deny
    			Deny from all
    		</files>
    
    		# Rules to disable directory browsing
    		Options -Indexes
    
    		<IfModule mod_rewrite.c>
    			RewriteEngine On
    
    			# Rules to protect wp-includes
    			RewriteRule ^wp-admin/includes/ - [F]
    			RewriteRule !^wp-includes/ - [S=3]
    			RewriteCond %{SCRIPT_FILENAME} !^(.*)wp-includes/ms-files.php
    			RewriteRule ^wp-includes/[^/]+\.php$ - [F]
    			RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F]
    			RewriteRule ^wp-includes/theme-compat/ - [F]
    
    			# Rules to prevent php execution in uploads
    			RewriteRule ^(.*)/uploads/(.*).php(.?) - [F]
    
    			# Rules to block unneeded HTTP methods
    			RewriteCond %{REQUEST_METHOD} ^(TRACE|DELETE|TRACK) [NC]
    			RewriteRule ^(.*)$ - [F]
    
    			# Rules to block suspicious URIs
    			RewriteCond %{QUERY_STRING} \.\.\/ [NC,OR]
    			RewriteCond %{QUERY_STRING} ^.*\.(bash|git|hg|log|svn|swp|cvs) [NC,OR]
    			RewriteCond %{QUERY_STRING} etc/passwd [NC,OR]
    			RewriteCond %{QUERY_STRING} boot\.ini [NC,OR]
    			RewriteCond %{QUERY_STRING} ftp\:  [NC,OR]
    			RewriteCond %{QUERY_STRING} http\:  [NC,OR]
    			RewriteCond %{QUERY_STRING} https\:  [NC,OR]
    			RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
    			RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|%3D) [NC,OR]
    			RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [NC,OR]
    			RewriteCond %{QUERY_STRING} ^.*(\[|\]|\(|\)|<|>|ê|"|;|\?|\*|=$).* [NC,OR]
    			RewriteCond %{QUERY_STRING} ^.*("|'|<|>|\|{||).* [NC,OR]
    			RewriteCond %{QUERY_STRING} ^.*(%24&x).* [NC,OR]
    			RewriteCond %{QUERY_STRING} ^.*(127\.0).* [NC,OR]
    			RewriteCond %{QUERY_STRING} ^.*(globals|encode|localhost|loopback).* [NC,OR]
    			RewriteCond %{QUERY_STRING} ^.*(request|concat|insert|union|declare).* [NC]
    			RewriteCond %{QUERY_STRING} !^loggedout=true
    			RewriteCond %{QUERY_STRING} !^action=jetpack-sso
    			RewriteCond %{QUERY_STRING} !^action=rp
    			RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in_.*$
    			RewriteCond %{HTTP_REFERER} !^http://maps\.googleapis\.com(.*)$
    			RewriteRule ^(.*)$ - [F]
    
    			# Rules to block foreign characters in URLs
    			RewriteCond %{QUERY_STRING} ^.*(%0|%A|%B|%C|%D|%E|%F).* [NC]
    			RewriteRule ^(.*)$ - [F]
    
    			# Rules to help reduce spam
    			RewriteCond %{REQUEST_METHOD} POST
    			RewriteCond %{REQUEST_URI} ^(.*)wp-comments-post\.php*
    			RewriteCond %{HTTP_REFERER} !^(.*).*
    			RewriteCond %{HTTP_REFERER} !^http://jetpack\.wordpress\.com/jetpack-comment/ [OR]
    			RewriteCond %{HTTP_USER_AGENT} ^$
    			RewriteRule ^(.*)$ - [F]
    		</IfModule>
    	# END Tweaks
    # END iThemes Security
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    Thread Starter Deedle

    (@deedle)

    Yup I have firebug, I’m getting wildly different results from when I locally access the files to when I access them online, I’ll try an describe the differences:

    Locally hosted:
    /readme.html
    > GET readme.html
    Page loads correctly
    File address is appended onto domain name. clientsaddress.co.nz/readme.html

    /wp-login.php
    > GET wp-login.php
    Page loads correctly
    File address is appended onto domain name. clientsaddress.co.nz/wp-loging.php

    /index.php
    > GET index.php
    Page is redirected to clientsaddress.co.nz, gets stuck in redirection loop. File address does not appear in the domain name since it is redirected.

    /wp-admin.php (dashboard)
    > GET /wp-admin.php
    Page loads dashboard fine. Eventually another Get request completes for admin-ajax.php. The file address is appended onto the domain name.

    visit site:
    > GET clientaddress.co.nz
    Page goes into the same redirection loop.

    Now when I try connect to the actual domain name, some of these aren’t accessible and the login address is different. These are the results.

    Actual Hosting:
    /readme.html
    > GET readme.html
    Forbidden error, the file is there I’m assuming the login credentials the client has given me are not the administrative ones which is another item to add to the todo list. File name is appended onto the domain name. clientsaddress.co.nz/readme.html

    /wp-login.php
    > GET wp-login.php
    This is where things get interesting, this request pulls up a 404 error, clientsaddress.co.nz/wp-login.php reads 404, to login I have to go to clientsaddress.co.nz/wplogin

    /wp-admin.php (dashboard)
    > GET /wp-admin/
    Works fine, however instead of the ajax file that I receive locally I have GET requests for stats on the page. The ajax file is not loaded.

    visit site:
    GET clientsaddress.co.nz
    Takes me to the homepage and has 3 more GET requests for a plugin, facebook addon and wp.widgets.com API request.

    Sorry if this isn’t very easy to follow there is a huge amount of information available through the firebug plugin and I’m trying to be as relevant as possible.

    Thread Starter Deedle

    (@deedle)

    Unfortunately not I can’t access the logs from my level. Is there nothing I can do from here to maybe troubleshoot why the local pages are not being loaded but the dashboard is.

    Thread Starter Deedle

    (@deedle)

    I don’t have access to the logs of the hosting, only the FTP at the moment since the site is still hosted by the previous developer. I checked the permafiles and saved them again. Still the same problem.

    Thread Starter Deedle

    (@deedle)

    These are my configurations:

    ##
    # Host Database
    #
    # localhost is used to configure the loopback interface
    # when the system is booting.  Do not change this entry.
    ##
    127.0.0.1       localhost
    255.255.255.255 broadcasthost
    ::1             localhost
    127.0.0.1 clientsaddress.co.nz
    127.0.0.1 www.clientsaddress.co.nz
    NameVirtualHost *
    <VirtualHost *>
    DocumentRoot "/Applications/MAMP/htdocs"
    ServerName localhost
    </VirtualHost>
    <VirtualHost *:80>
    DocumentRoot "/Path/"
    ServerName clientsaddress.co.nz
    ServerAlias www.clientsaddress.co.nz
    </VirtualHost>

    So at the moment I can access all administrative pages running in the background. When I try to access the homepage Chrome is indicating that I’m stuck in a redirect loop and firefox is saying that I’m not redirecting properly which I’m going to assume is the same problem. When I try and access on of the other pages on the site ie clientaddress/about I’m getting a page not found error.

    When you say check the hosting, do you want me to check the logs online and see what files are being pulled when I connect to actual site?

    Thread Starter Deedle

    (@deedle)

    Ross,

    Can’t thank you enough for your help, I’ve seen that you post quite a bit in these forums helping people out. I really appreciate the help, this community is lucky to have you.

    *Edit

    Okay I thought I had it completely sorted, turns out I edited my hosts file to redirect traffic to the actual webpage.

    I’m having an issue where traffic is in a redirection loop because the database is attempting to access http://*clientaddress and the hosts file is trying to access *clientaddress without the prefix.

    I can access the administration page, but not the content on the site.

    Thread Starter Deedle

    (@deedle)

    Hi Ross,

    I’ll give this method a crack however what makes this confusing is that even when I use a fresh install of word-press and go to install the custom theme that comes with the website the same thing occurs, the database edits occur and I am redirected to the actual domain of the website. I’m almost positive this is because of the woocommerce plugin, the previous admin has installed over 40 plugins of which a ton are out of date, one of these has disabled plugin editing from the cms page as well so the whole thing is a bit custard at the moment.

    I’ll give the method you described above a go and maybe from them I can tinker with the plugins until I find a setup that will allow me to host this on my localhost.

    Thanks for the help.

Viewing 10 replies - 1 through 10 (of 10 total)