Hi, I have added to my apache 2.4 config files rewrite code to block hotlinking but it doesn't work. I then tried a very simple rewrite to redirect one path to another and that didn't work.
So, first off I need help on making sure mod_rewrite works. I checked via php info if the mod_rewrite was loaded and it is loaded.
Here's my first test code:
So, in our case I have https://example.com/test/ and it should redirect to https://example.com/phpinfo.php
However, the code posted above doesn't work. If I put the /test/ it just says no such directory found. That directory doesn't exist.
I am totally new to using the rewrite module. So, I want to make sure the code is correct.
I tried also adding ifmodule tags with and without them I still get the same results.
I ran a command for apache to check if the mod_rewrite was installed/loaded and it spit back out mod_rewrite.
So, I am pretty sure the module is installed and enabled.
I do have folders for apache24 and appache 22 and am not sure if apache22 is still installed on my machine. Let me know what command I can run to see if both apache24 and 22 are running and how I can delete apache22 without messing up my apache24.
Thanks for your time.
So, first off I need help on making sure mod_rewrite works. I checked via php info if the mod_rewrite was loaded and it is loaded.
Here's my first test code:
Code:
RewriteEngine On
RewriteRule "/test/" "/phpinfo.php"
So, in our case I have https://example.com/test/ and it should redirect to https://example.com/phpinfo.php
However, the code posted above doesn't work. If I put the /test/ it just says no such directory found. That directory doesn't exist.
I am totally new to using the rewrite module. So, I want to make sure the code is correct.
I tried also adding ifmodule tags with and without them I still get the same results.
I ran a command for apache to check if the mod_rewrite was installed/loaded and it spit back out mod_rewrite.
So, I am pretty sure the module is installed and enabled.
I do have folders for apache24 and appache 22 and am not sure if apache22 is still installed on my machine. Let me know what command I can run to see if both apache24 and 22 are running and how I can delete apache22 without messing up my apache24.
Thanks for your time.