vga256 (npub1yqw…ywz8) i've gotten the htaccess easy urls thing working with the info from [this](https://stackoverflow.com/questions/18406156/redirect-all-to-index-php-using-htaccess ) post on stackoverflow & wanted to share my findings with you
i feel like this isn't *exactly* the best way to be doing this, but! it works for the time being, so i'll take it
(if anybody reads this who knows more about htaccess rules and has insight i'm very down to hear, i wanna learn more)
what i am pretty sure the original htaccess script does:
"if the file or directory exists, route it through index.php. if it doesn't, route it back to root"
which is honestly what i would Like to do - but something in there is being naughty with the way kiki builds queries, i think. maybe. i feel like the htaccess rules are doing what they are told to do, but kiki's urls are confusing it? for lack of words?
anyway here's what i'm running right now:<code>RewriteEngine On<br>RewriteBase /<br>RewriteCond %{REQUEST_FILENAME} !-f<br>RewriteCond %{REQUEST_FILENAME} !-d<br>RewriteRule ^(.*)$ /index.php?page=$1 [NC,L,QSA]<br></code>
the initial RewriteRule ^index\.php$ - [L] does not seem to be catching anything. if what i did later in the rules is anything to go by it's because it doesn't know what to do without ?page= but i'm not sure how to pop that in there in a way that makes it behave, so it's omitted until i figure that out
the two RewriteConds stay the same. if i read them right they're still looking for files/directories that do not exist and then passing them to the next rule. they're intended to be part of the "if these don't exist send them back to index" but we're kinda repurposing that
the last rule changes . to ^(.*)$ so it's not just catching one character it's catching the full string
the original /index.php target needed /index.php?page=$1 - there is, from the substack link, apparently a way to make it so that the ?page= isn't necessary to explicitly state, but for now, we need it, otherwise kiki won't direct us to the correct pageNC
for "ignore case", L for "last", and QSA to append query strings instead of dropping them (i don't think the last one is super necessary for what kiki is doing, but maybe the wiki functionality could use it? maybe?)
this probably still needs some level of polish / checking over to make sure everything's good, but, it works - i hope this helps!