I got the following rule in my .htaccess (no other rules before or after this one):
RewriteRule ^archive/([^/\.]+)/?$ /archive.php?letter=$1 [L]
What I need this rule to do is the following:
mydomain/archive/letter
rewrite to: mydomain/archive.php?letter=letter
It works for all letters of the alphabet, except for a.
The result is, while browsing:
mydomain/archive/b --> no redirect, shows page as it were archive.php?letter=b (correct)
mydomain/archive/a --> redirect to: mydomain// (incorrect)
I searched high and low, but I can't see what I'm doing wrong.
For some reason another rule after this one was interfering with the one in my question. I removed that one and it works now. So, the rule in the question is a working one :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.