.htaccess not working with .cfm pages on Railo - .htaccess

I want to do some very basic .htaccess stuff like block a directory by IP address. I know why this problem is happening, I just don't know how to fix it. I've read every post I can and there doesn't seem to be a consensus on how to fix it. Railo/Tomcat is grabbing control of the page before .htaccess rules are applied.
I am running Centos with Railo / Tomcat / Apache. I believe I am using mod_cfml, at least that's what's under the connector folder.
I have tried putting my .htaccess files in httpd.conf without any luck. I'm not sure I was doing that correctly, but I dropped the code into the virtual domain section of the site I'm working on.
Has anyone got this to work properly?

On iis you can change the order modules run which would solve that issue Asbyou would tell the htaccess module to run before mod_cfml
Can you do that on Apache?

Related

Valet not working on kali linux. Redirecting to htdocs

I installed valet on Kali Linux, and pinged a test domain to make sure it's working which it is. However, after running valet park in the folder directory that I have my files. It redirects me to xampp dashboard whenever I access the route on the browser. I know very well to type the folder name followed by a .test domain. I've tried almost everything online. I see this is a popular issues and I've gone through every possible solution I see online. It's still not working, I tried to rename the index.php file in the htdocs folder which gets render automatically whenever you access the htdocs folder, now it only list the folder structure for me as a result. I tried to move the project out of htdocs still not working. I stopped apache and tried accessing it again but unfortunately I got, "This site cant be reached"
No response.. Well fortunately i was able to fix it, not sure it's the best way. But hopefully this might help someone, i configured ssl on the domain with valet using valet secure foo.bar and it automatically redirect to https. That way, i was able to escape from xampp

Changes to the .htaccess file are not taken into account

I am using Prestashop 1.7.6 on a Debian 10 + HestiaCP and I tried to update the .htaccess of the site to have a better PageSpeed score.
So, I added my cache rules then uploaded the new file. Nothing happened.
I also tried to reload the Prestashop .htaccess from the dashboard and also restarted the apache2 service.
I precise that this .htaccess is, in a way, working because the shop couldn't work without it. However, the changes I made are not taken into account.
Is there a way to activate these changes?

How do I find the "top - level" .htaccess file?

I have roundcube installed on a server i'm working on now. But the rules that deny access to 3 files as shown here, in the roundcube root, aren't being applied. I know this because I can browse the config, temp and logs files via a browser.
I'm I right to assume that there's another .htaccess file not allowing these rules to be applied?
and if yes, how do I do I find this file and make sure that the rules are applied?
If no, what else would cause this kind of behaviour?
The server is running Ubuntu 14.04

.htacces rewrite to subdomains without wildcard dns

I've googled around quite a bit and also tried some of the solutions I've found. Unfortunately without success. My problem: For a Wordpress install I couldn't do a subdomain setup since I couldn't activate wildcard DNS on my server. This made me set up my Wordpress network install on the main domain and on two subdirectories as below:
domain.be
domain.be/alpha
domain.be/beta
I can however make set subdomains on my server, so I set up the following:
alpha.domain.be
beta.domain.be
I'm now trying to use .htaccess to rewrite this, so that people who go to domain.be/alpha are automatically redirected to alpha.domain.be - and obviously the same for the second (beta) subdirectory. As far as I can see, I should be able to pull this off without using dns wildcards. Unfortunately, I'm too inexperienced with .htaccess rules to pull this off. Anyone out there who can help me with this?
If you have your doubts about this set-up, I'm also interested in hearing about it.
Yeah, it's not gonna work. Mostly becasue the subfolder address is hardcoded in the blog address.
two things you can try:
make manual subdomains and pint the docroot for it at the wordpress install
use the domain mapping plugin to map subdomains to the subfolders. still gotta add each subdomain as a server alias to the same folder as wordpress.

Any way to know if .htaccess is enable?

any way to know if .htaccess is enable? I cannot read the httpd.conf file in my shared server.
I have access through ssh. My hosting provider uses cPanel Accelerated.
Regards
Javi
What about just putting a .htaccess somewhere which alters some readily-observable settings and look whether they have been changed or not?
Try uploading a sample .htaccess file (e.g. with a single simple redirect rule) and check if it works.

Resources