So I have this rule in place
# Rewrite for account view
RewriteRule ^([^/]+)/([^/]+)/?$ account.php?type=$1&user=$2 [NC,L]
which translate to http://www.site.com/user/s2xi
but now I want to get even more creative with the url and append a theme location to it so:
http://www.site.com/user/s2xi/theme/slate/
so that I can for instance access the CSS file for the theme I would simply need to type in
http://www.site.com/user/s2xi/theme/slate/css/slate.css
how can I modify or add another RewriteRule to be able to get the results I want?
also, how would I be able to apply and access my theme files with the new url in my PHP code?
my current path to my themes is library/themes/users/slate
with sub folders /css
and /js
My attempt:
# Rewrite for user theme location
RewriteRule ^([^/]+)/([^/]+)/theme/([^/]+)/?$ account.php?type=$1&user=$2$theme=$3 [NC,L]
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…