Create alias name for a file using htaccess
I want to replace my original file name in a folder with a alias via htaccess
my folder: http:// localhost/folder/foo.png
renamed address: http:// localhost/folder/bar.png
After that, I want to close the user's access to the original file i mean this path: "http:// localhost/folder/foo.png"
See also questions close to this topic
Cross domain issue with font-face and Apache load balancer
I have 2 application nodes behind an apache load balancer which looks like this:
ProxyRequests off <Proxy balancer://webfarm> BalancerMember http://192.168.1.14:80 BalancerMember http://192.168.2.15:80 ProxySet lbmethod=byrequests </Proxy> <Location /balancer-manager> SetHandler balancer-manager </Location> ProxyPass /balancer-manager ! ProxyPass / balancer://webfarm/
When accessing the instances individually by IP, the font is loaded normally. However accessing from the load balancer there seems to be a cross domain issue:
Access to Font at 'http://192.168.1.14/fonts/open-sans/OpenSans-Bold.ttf' from origin 'http://192.168.10.10' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://192.168.10.10' is therefore not allowed access.
I have tried setting headers on both nodes and the httpd.conf of the load balancer as follows:
AddType application/x-font-ttf ttc ttf AddType application/x-font-otf otf AddType application/font-woff woff AddType application/font-woff2 woff2 AddType application/vnd.ms-fontobject eot <FilesMatch ".(eot|ttf|otf|woff|woff2)"> Header set Access-Control-Allow-Origin "*" </FilesMatch>
And restarted apache on all instances. Doesn't seem to work. Your help is much appreciated.
Thanks in advance.
Apache server This site can’t be reached
My site is hosted on digital ocean and it was working fine until today when I checked and I couldn't access the site, it was showing "This site can’t be reached"
Below is my errorlog
[Fri Feb 23 10:37:13.206993 2018] [ssl:warn] [pid 12108] AH01916: Init: (one-woman.localdomain:443) You configured HTTP(80) on the standard HTTPS(443) port!
[Fri Feb 23 10:37:13.209343 2018] [mpm_prefork:notice] [pid 12108] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Fri Feb 23 10:37:13.209364 2018] [core:notice] [pid 12108] AH00094: Command line: '/usr/sbin/apache2'
[Fri Feb 23 10:45:56.123621 2018] [mpm_prefork:notice] [pid 12108] AH00169: caught SIGTERM, shutting down
How can I stop apache child process manually on MPM mode?
Is there any way to control each apache child process manually?
My system is running with apache2.4 with MPM-worker and couple of children processes (currently it's 2). And the child process is designed to read & load from DB to memory at once when it starts. It make some loading time.
Now I need to reload the data from DB to memory periodically, like once a day. It means I need to restart the children processes.
Using apachectl command - restart | graceful can help restart parent and all children processes. But the thing I need to resolve is, there would be a delay if I restart all children processes at once - delay to wait for all children processes' memory loading.
Thus I'm looking a way to do this as manually consequently if it is possible.
i.e. restart child1, wait for child1 to load all and then restart child2.
I tried using kill command on linux,
kill -9 pid of each child process can stop the process, but kill -19 seems doesn't work.
Please share your idea.
Redirect everything to 404 except files in public folder
How redirect everything inside
rootfolder to 404, except files in
root/publicfolder? Directory listing must be disabled everywhere and
.htaccessredirected to 404 as well. It's possible to make that with one
Currently i have
Redirect 404 /in
root, but when trying to access
.htaccess, it's forbidden. Thanks
.htaccess - Replace (+) plus with Dash (-) and path of the URL
I want to replace:
Then, the url will be redirected to:
anybody can help me? im using wordpress, and i expects the code can be work in .htaccess.
- How to redirect a subdomain to inner page?