I've been trying out a few permutations and still can't figure this out. I have 3 requirements:
- forward everything from xxx.php to just xxx
- mydomain/sentence actually loads mydomain/page?q=sentence
- exclude a folder e.g. mydomain/logs
So I managed to get the first two to work using:
Options +FollowSymLinks
RewriteEngine On
#RewriteCond %{REQUEST_URI}!^/panel/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ page.php?q=$1 [NC,L]
# RewriteRule ^([^\.]+)$ $1.php [NC,L]
If I uncomment the third line everything breaks. Any help is appreciated! Also please point out any errors I might have. Thanks in advance! I apologize for the bad formatting. The editor kept giving errors no matter how I typed.