Re: RewriteCond and negative matching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Mon, Apr 14, 2025 at 11:32 AM Dave Wreski <dwreski@xxxxxxxxxxxxxxxxxxx.invalid> wrote:

Hi,

We're getting a ton of 404s for URLs for paths that don't exist, like /apps and other nonsense off the root that never existed that I'd like to redirect to the homepage.

...

If the "home page" is an index file in the documentroot, a simple FallbackResource will suffice, and you don't need to use mod_rewrite at all.

I believe that only works for physical files, like /images/myimage.gif, and not for virtual paths set up by Joomla, like /news/myarticle.html, correct?

I tried just adding it in the VirtualHost, but would like it to work for specific paths, not for any link that doesn't exist on the entire site.

Thanks,
Dave





If you need the complexity of mod_rewrite, I would start by using the rewrite log to troubleshoot.
This will allow you to see the requested URI path, and rewritten path, if applicable. 

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux