Hi all,
Having a few issues with the following mod_rewrite statements..
So the idea is that if a physical file existed then the user would be pointed to that. For example, a file at app/wwwroot/images/add.jpg could be access at http://localhost:8082/images/add.jpg.
If the file or folder doesn't exist then it should redirect to the php file. Eg. if you visit http://localhost:8082/test it'll point to app/wwwroot/index.php?url=/test.
However, at the moment all requests are going to the index.php file, which implies that the rewrite conditions aren't working. Does anyone have any ideas what the issue is?
Thanks!
Having a few issues with the following mod_rewrite statements..
Code:
RewriteCond ^app/wwwroot$%{REQUEST_FILENAME} -d
RewriteCond ^app/wwwroot$%{REQUEST_FILENAME} -f
RewriteRule ^(.*)$ app/wwwroot/$1 [L]
RewriteRule ^(.*)$ app/wwwroot/index.php?url=$1 [QSA,L]
So the idea is that if a physical file existed then the user would be pointed to that. For example, a file at app/wwwroot/images/add.jpg could be access at http://localhost:8082/images/add.jpg.
If the file or folder doesn't exist then it should redirect to the php file. Eg. if you visit http://localhost:8082/test it'll point to app/wwwroot/index.php?url=/test.
However, at the moment all requests are going to the index.php file, which implies that the rewrite conditions aren't working. Does anyone have any ideas what the issue is?
Thanks!
Last edited: