Your "group" of [a-z,0-9,A-Z-]
makes no sense and the use of .+
all that is inside [...]
almost redundant, have to learn first regex before leaving doing anything friend, not wanting to sound bad, but there are many examples on the site, mainly about regex, see regex and htaccess
The commas inside the []
looks like you used it as a separator, but in regex it nay exists, the -
within []
must be "escaped" with bar \
.
The point sign .
is what caused the failure, this because the point is a meta-character that "house" with any character, see what happens:
Now adjust:
So adjust for this:
RewriteEngine On
RewriteRule ^dados/series/([a-z0-9A-Z\-]+)/?$ dados-series.php?cache=$1 [NC,L]
RewriteRule ^dados/series/([a-z0-9A-Z\-]+)/configs/?$ serie-configs.php?serie=$1 [NC,L]
And if it still doesn’t work reverse the order:
RewriteEngine On
RewriteRule ^dados/series/([a-z0-9A-Z\-]+)/configs/?$ serie-configs.php?serie=$1 [NC,L]
RewriteRule ^dados/series/([a-z0-9A-Z\-]+)/?$ dados-series.php?cache=$1 [NC,L]
Note that if the urls are related to the internal documents then you do not need to rewritebase
, use it can cause acidendetes, also removed the <IfModule mod_rewrite.c>
because from my point of view if the module is not activated even with IF the site will fail because the links will accuse that do not exist, then it is better than to error 500 instead of the person accessing broken pages
I’m trying to learn regex, so I’m testing in many ways, thanks for the suggestions.
– Leo Letto