Re: Pretty urls (remove file extension, fake folders)
Posted: Thu Oct 20, 2016 4:17 am
Another trick I would suggest is to simply catch any character that is not a forward slash, instead of having to declare the characters manually (0-9a-zA-Z), so:
The ^ means "not", so [^/] means "anything that is NOT /". 
Code: Select all
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/?$ $1.php?cat=$2&page=$3 [L]
