This is occuring on my local machine, Lubuntu 18.04 with apache2 and Php 7.2.15.
Steps tried:
- Enable hidden files
No .htaccess file seen:
- Switch permalink structure to attempt to force Wordpress to create new .htaccess file (if missing). Reload file manager.
No change.
- run terminal command
whereis .htaccess
Many folders listed but none in the target ( /var/www/html/wptest2/ ). There is nothing even inside /var
below:
owner@G700:~$ whereis .htaccess
: /usr/bin/. /usr/sbin/. /lib/x86_64-linux-gnu/. /usr/lib/x86_64-linux-gnu/.
/usr/lib/. /bin/. /sbin/. /etc/. /etc/.java /lib/. /lib64/. /usr/games/. /usr/local/bin/.
/usr/local/sbin/. /usr/local/etc/. /usr/local/lib/. /usr/local/games/. /usr/include/.
/usr/local/. /usr/libexec/. /usr/share/. /opt/emby-server/bin/.
/opt/dmmediaconverter/bin/. /opt/wine-stable/bin/. /opt/calibre/bin/.
/home/owner/.nvm/versions/node/v12.4.0/bin/. /home/owner/.local/bin/.
/snap/bin/. /usr/share/man/man4/. /usr/share/man/fi/. /usr/share/man/pl/.
/usr/share/man/id/. /usr/share/man/pt_BR/. /usr/share/man/man6/.
/usr/share/man/ja/. /usr/share/man/hr/. /usr/share/man/sv/.
/usr/share/man/hu/. /usr/share/man/man1/. /usr/share/man/fr.ISO8859-1/.
/usr/share/man/zh_CN/. /usr/share/man/man5/. /usr/share/man/zh_TW/.
/usr/share/man/man8/. /usr/share/man/ca/. /usr/share/man/man3/.
/usr/share/man/es/. /usr/share/man/nl/. /usr/share/man/da/.
/usr/share/man/it/. /usr/share/man/uk/. /usr/share/man/ko/.
/usr/share/man/fr.UTF-8/. /usr/share/man/sl/. /usr/share/man/man2/.
/usr/share/man/pt/. /usr/share/man/de/. /usr/share/man/de.UTF-8/.
/usr/share/man/cs/. /usr/share/man/sr/. /usr/share/man/man7/.
/usr/share/man/fr/. /usr/share/man/pl.UTF-8/. /usr/share/man/vi/.
/usr/share/man/ru/. /usr/share/man/tr/. /usr/share/info/. /usr/src/bcmwl-
6.30.223.271+bdcom/. /usr/src/linux-headers-4.15.0-58-
generic/.tmp_versions /usr/src/linux-headers-4.15.0-58-generic/.config
/usr/src/linux-headers-4.15.0-58-generic/. /usr/src/linux-headers-4.15.0-
58/. /usr/src/linux-headers-4.15.0-62-generic/.tmp_versions
/usr/src/linux-headers-4.15.0-62-generic/.config /usr/src/linux-headers-
4.15.0-62-generic/. /usr/src/linux-headers-4.15.0-62/.
Any ideas what's going on here? The wordpress install fully works. I can access the back end, create posts and pages, navigate across the front end including clicking on links to new pages etc. I have developing a plugin on this side for months. But the .htaccess file seems not to exist.
If someone advises me to simply manually create an .htaccess file my followup question becomes, how can I verify that wordpress uses it? I need this file to enter some rules mandated by a JWT/Rest Api plugin.
Update
I added the following .htaccess file code to a fresh file at /var/www/html/wptest2/
https://wordpress.org/support/article/htaccess/
iersn // meant to causing a breaking change. But doesn't
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
Wordpress does not break from the line above.
That said my install has always been on ugly links as pretty links cause not-found errors. I believe I don't have that properly setup and I'm sure this .htaccess issue is a contributor.