Keyth
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Prevent browsing to sub domainWell thanks for all your help esmi, but still not working!
Im not sure if the directories would be classed as sub domains or rather just sub directories.
Reading up on a post written by Jeff Starr on Perishable Press I found this article talking about RedirectMatch. It now works a treat but still puzzled as to why all the others did not work. Thanks again for your help.
Forum: Fixing WordPress
In reply to: Bug: Your Browser is out of Date!same
Forum: Fixing WordPress
In reply to: Prevent browsing to sub domainThanks very much.
I have added that but still it doesnt work. I even tried adding a forward in the host control panel but neither work.
Heres your version with actual domains:
RewriteCond %{HTTP_HOST} ^kcpackaging\.co\.uk/polycover$ [NC] RewriteRule ^(.*)$ https://kcpackaging.co.uk [R=301,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
Heres the hosts version which is what messed everything up originally after adding re-directs through control panel:
rewriteengine on rewritecond %{HTTP_HOST} ^www.kcpackaging.co.uk$ [OR] rewritecond %{HTTP_HOST} ^kcpackaging.co.uk$ rewriterule ^polycover$ "http\:\/\/kcpackaging\.co\.uk\/" [R=301,L] #50ad27faa46d2 # BEGIN WordPress <IfModule mod_rewrite.c> RewriteBase / </IfModule> # END WordPress rewriterule ^index\.php$ - [L] rewritecond %{REQUEST_FILENAME} !-f rewritecond %{REQUEST_FILENAME} !-d rewriterule . /index.php [L]
Forum: Fixing WordPress
In reply to: Prevent browsing to sub domainThanks for your reply esmi. I want to prevent access to subdomaina from mydomain
mydomain.co.uk/subdomaina redirects to mydomain.co.uk unless loaded through a browser as www. subdomaina.co.uk
Forum: Fixing WordPress
In reply to: Prevent browsing to sub domainCan anybody please advise if there is something wrong with this line?
RedirectMatch 404 /\\subdomaina(/|$)
where subdomaina is a directory?
Forum: Fixing WordPress
In reply to: Prevent browsing to sub domainI read that instruction in your previous post but get a 500 error.
Is there something wrong with the first line?RedirectMatch 404 /\\subdomaina(/|$) # 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
Forum: Fixing WordPress
In reply to: Prevent browsing to sub domainThanks esmi.
I had been playing with a plugin which upset my htaccess file.Where would I place the following?
RedirectMatch 404 /\\subdomaina(/|$)