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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -