I have a site that's moved to a new home. I'd like to redirect all of that site's URLs (domain.com/*) to domain.com/index.php except domain.com/image.png. Can anybody suggest a mod_rewrite rule that would rewrite all URLs except the URL for the image file?
Try this:
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/image.png$
RewriteRule (.*) index.php?page=%{REQUEST_URI} [L,NC,QSA]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With