.htaccess - Disable access to addon domain through maindomain.com/addondomainfolder -


i want disable access folder of addon domain using .htaccess can't seem figure out.

my folder structure this:

root/maindomain (www.maindomain.com/maindomain) root/addondomain (www.addondomain.com) 

i want disable access addon domain through www.maindomain.com/addondomain url.

how this?

my htaccess file in root directory:

rewriteengine on rewritecond %{http_host} ^(www\.)?swen\.me.uk$ [nc] rewriterule ^/?creepypastaindex http://www.creepypastaindex.com/ [l,r]  rewriteengine on rewritecond %{http_host} ^(www\.)?swen.me.uk$ rewritecond %{request_uri} !^/swen/ rewriterule ^(.*)$ /swen/$1 

this should do. have escape both dots.

rewriteengine on             rewritecond %{http_host} ^(www.)?swen\.me\.uk$ [nc]             rewritecond %{request_uri} ^/creepypastaindex/(.*)$             rewriterule ^(.*)$ - [l,r=404] 

source


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -