WHMCS Services Forum
Friendly URLs - Printable Version

+- WHMCS Services Forum (https://www.whmcsservices.community)
+-- Forum: WS Modules (https://www.whmcsservices.community/forumdisplay.php?fid=5)
+--- Forum: Addons Modules (https://www.whmcsservices.community/forumdisplay.php?fid=6)
+---- Forum: Announcement Pro (https://www.whmcsservices.community/forumdisplay.php?fid=34)
+---- Thread: Friendly URLs (/showthread.php?tid=1254)



Friendly URLs - whmcsservices - 02-12-2025

[Image: AnnouncementPro8.png]

If you choose no then you don't need to do nothing

If you choose Yes then you need to edit the .htaccess

I have added the ReWrite rules to .htaccess in the root of our WHMCS install but the rules are being ignored - so all related links are giving a 404 error.

ANSWER: If Friendly URLs are enabled, the rules need to go before these in the existing .htaccess otherwise they get ignored.

here is what you need to add


# Announcements Pro
# Rewrite SEO-friendly URLs to WHMCS index.php
RewriteRule ^announcements/view/([0-9]+)/([a-zA-Z0-9-]+)/?$ %{REQUEST_URI}/index.php?m=wsannouncementpro&action=view&id=$1 [L,QSA]
RewriteRule ^announcements/([0-9]+)/([a-zA-Z0-9-]+)/?$ %{REQUEST_URI}/index.php?m=wsannouncementpro&catrgoryid=$1 [L,QSA]
RewriteRule ^announcements/viewbymonth/([a-zA-Z0-9-]+)/?$ %{REQUEST_URI}/index.php?m=wsannouncementpro&viewbymonth=$1 [L,QSA]

# Ensure "wsannouncementpro/" loads index.php?m=wsannouncementpro
RewriteRule ^announcements/?$ %{REQUEST_URI}/index.php?m=wsannouncementpro [NC,L]