Closed Hansat1 closed 2 years ago
Could you fix your coypasted code there? Can't really tell what you're doing wrong otherwise.
The links worked before I added the Directory in the apache httpd.conf file. echo <<<EOT <!DOCTYPE html>
EOT;
What.
...are you having problems with /takedown.php etc. not working? Is that what you're asking?
My problem is after adding the Directory Text to the XAMPP httpd.conf file the links on the website no longer works and without it they work again
You're doing the RewriteRule wrong. You're matching ^/?$
twice, meaning second one is always ignored. (And is also incorrect for what you're trying to do)
Here's a working example:
RewriteCond "%{ENV:REDIRECT_STATUS}" "^$"
RewriteRule "^/?favicon.ico$" "favicon.ico" [L,END]
RewriteRule "^/?robots.txt$" "robots.txt" [L,END]
RewriteRule "^/?$" "index.php" [L,END]
RewriteRule "^(.+)$" "files/$1" [L,END]
What woud be correct for what i am trying to do?
I even gave you an example. Please use your own head. If you can't even figure that out, you're frankly not ready to host a public filesharing site.
Hey, I am trying to add to the Apache Directory a site but I can't get it right working. I tried it like that. <Directory C:\xampp\htdocs> Options +FollowSymLinks -MultiViews -Indexes AddDefaultCharset UTF-8 AllowOverride None
<Directory C:\xampp\htdocs\files> Options -ExecCGI php_flag engine off SetHandler None AddType text/plain .php .php5 .html .htm .cpp .c .h .sh I i try accessing the link it only redirects it to a 404 Page