Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other How to remove subdirectories using mod_rewrite in .htaccess Reply To: How to remove subdirectories using mod_rewrite in .htaccess

#170976
__
Participant

Simple solutions are the best ones:
I would just make the trailing slash optional in the first place.

RewriteRule ^([A-Za-z]+)/?$ /cat/play/$1.html [L]

This way, you will match both the example.com/keyword/ and example.com/keyword forms.