I'm attempting to create a redirect from a sub directory on my server, to another sub directory of the sub directory.
Basically I have a similar structure to below:
domain - sub directory a - sub directory b - - .htaccess - - sub directory b1 - - sub directory b2 - - sub directory b3 - - sub directory b4 - - public
I'm looking to redirect any requests to sub directory b or it's sub directories to be directed to the public directory of sub directory b.
Currently I have the following in my .htaccess file in sub directory b:
RewriteEngine on RewriteRule ^$ public/ [L] RewriteRule (.*) public/$1 [L]
However whenever I attempt to access sub directory b, I get an internal server error. I'm certain it is an error with my .htaccess as when I remove the .htaccess I can access the directory fine.
Thanks for all your assistance.
Solution: htaccess redirect from sub directory
Turns out I was being a muppet and forgotten to get the exact redirect directory name correct.
Capitalising the 'p' on public resolved the error.