Htaccess /imagename/delete
Okay so i'm working on creating a thing to delete images from my server. I
figured out about the unlink function and have turned it into a get
variable. How can I use htaccess to delete a file from my server with a
url like this example.com/imagename/delete
RewriteRule ^/delete/([^/]+)$ index.php?delete=$1
I realized that this does /delete/imagename but I want the urls to be
/imagename/delete. I tried the following but that didn't work.
RewriteRule ^/([^/]+)$/delete index.php?delete=$1
I know this sounds simple and easy to find on the web but I can't seem to
find this!
No comments:
Post a Comment