Mobile app version of vmapp.org
Login or Join
Alves908

: The RewriteBase directive controls the path prefix (the base URL) that is added back when you have a relative path substitution in the RewriteRule. The following (index.php) is a relative path

@Alves908

The RewriteBase directive controls the path prefix (the base URL) that is added back when you have a relative path substitution in the RewriteRule. The following (index.php) is a relative path substitution:

RewriteRule ^ index.php [L]


If you don't explicitly state the RewriteBase then the per-directory prefix (the filesystem path that lead to this .htaccess file) is automatically added. Since ~username is not part of the physical path on the filesystem, it is not part of the per-directory prefix and therefore not added to the substitution. However, it is required in this case in order to construct a valid URL, so you need to explicitly include this in the RewriteBase directive.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Alves908

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme