How to disable update-profile pages always?

007

Member
Hi everyone,
I'd like to disable access to update-profile pages.

I am not able to remove the content from the update-profile template, as LIST_FIELDS is mandatory, so I'd like to just disable it.

I've tried this code, from here, inside my apache2.conf with no luck (there is no redirect, no error). The mod_rewrite module is enabled. Any ideas on how to do this?
Code:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/lists\/([a-z0-9]{13})\/update\-profile\/([a-z0-9]{13})$ [NC]
RewriteRule ^.*$ - [F,L]

Code:
<Directory />
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/lists\/([a-z0-9]{13})\/update\-profile\/([a-z0-9]{13})$ [NC]
RewriteCond %{REQUEST_URI} ^/index.php\/lists\/([a-z0-9]{13})\/update\-profile\/([a-z0-9]{13})$ [NC]
RewriteRule ^.*$ - [F,L]
</Directory>

Code:
<LocationMatch />
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/lists\/([a-z0-9]{13})\/update\-profile\/([a-z0-9]{13})$ [NC]
RewriteCond %{REQUEST_URI} ^/index.php\/lists\/([a-z0-9]{13})\/update\-profile\/([a-z0-9]{13})$ [NC]
RewriteRule ^.*$ - [F,L]
</LocationMatch>
 
Last edited:
I found a resolution (for me at least). For anyone else with the same challenge, here's the steps I followed:

-Enable mod_rewrite module
-Enable htaccess usage in apache2.conf, by adding this code to it
Code:
<Directory "/var/www/html">
    AllowOverride All
</Directory>
-In mailwizz UI, ensure that clean URLs are disabled (backend > settings > common)
-Add an .htaccess file in the /var/www/html directory
-Inside the .htaccess file, place this code
Code:
# Redirect update-profile pages to a custom page
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/index.php\/lists\/([a-z0-9]{13})\/update\-profile\/([a-z0-9]{13})$ [NC]
RewriteRule ^(.*)$ update-profile.html [L]
-Create a custom html file for subscribers to see. Named it update-profile.html, and place it in the /var/www/html directory.
-Restart apache
 
Back
Top