31-Mar-2022 12:42
Literally trying to copy this logic into an irule and struggling with the translation:
Is not a regular file:RewriteCond %{REQUEST_FILENAME} !-f
Is not a regular directory:RewriteCond %{REQUEST_FILENAME} !-d
Is not a favicon: RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
Rewrite the URL: RewriteRule (.+) index.php?p=$1 [QSA,L]
Solved! Go to Solution.
24-Aug-2022 22:41
Hi @Walter_WorkAcct...using the htaccess tester, here's a before/after example:
The first two rewrite conditions are apache specific for local implementation and should be fine to ignore, but ignoring the favicon needs to be addressed. This results in an iRule that could look something like this (untested, might need adjustment):
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
if { not (($uri ne "/favicon.ico") or [string match apple-touch-icon*.png $uri]) } {
HTTP::uri /index.php?p=[string range $uri 1 end]
}
}
24-Aug-2022 22:41
Hi @Walter_WorkAcct...using the htaccess tester, here's a before/after example:
The first two rewrite conditions are apache specific for local implementation and should be fine to ignore, but ignoring the favicon needs to be addressed. This results in an iRule that could look something like this (untested, might need adjustment):
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
if { not (($uri ne "/favicon.ico") or [string match apple-touch-icon*.png $uri]) } {
HTTP::uri /index.php?p=[string range $uri 1 end]
}
}