php - Rewrite rule leads to 403 forbbiden error -
i have asked question here yesterday , user "faa" tried me, unfortunately couldn't solve issue.
original question here: rewriting url htaccess when directory exists
i doing simple rewrite not working (apparently) due directory access permissions.
the code:
*dynamic page: url.com/index.php?page=download
rewrite rule: ^download$ /index.php?page=download
the problem:
a directory named "download" exists. when rewrite rule tries rewrite dynamic page* path "download", returns 403 forbbiden error , page gets rewritten "download/?page=download".
now, if rename directory else, "downloads", works.
-- edit --
my server, default, protects every directory "403 forbbiden error". believe reason why it's not working, i'm not sure. conflict indeed? happening?
/download/?page=download
the reason why happening because somewhere mod_dir redirects requests directories missing trailing slash include trailing slash. interferring rewrite rule. since server automatically setup deny listing of directories, it's safe go ahead , turn directory slashes off:
directoryslash off
Comments
Post a Comment