Vannkorn

Full Stack Web Developer

Close

Configure Apache Rewrite Mod to Redirect to /web folder

Helpful when you need to point your web root directory to another folder rather than the default public_html/ folder

Ads: Register now via this link to receive $300 credit from Vultr

Helpful when you need to point your web root directory to another folder rather than the default public_html/ folder. For instance, bedrock uses public_html/web/ folder as its Document Root.

If your web host does not provide the functionality to do so, you can use the following configuration if you’re using Apache.

RewriteEngine on
RewriteCond %{REQUEST_URI} !web/
RewriteRule ^(.*)$ /web/$1 [L]

Leave a Reply

Your email address will not be published. Required fields are marked *