Category: mod-rewrite

.htaccess rewrite without www AND redirect to subdirectory

I’d like to redirect www.example.com/* to example.com/* And at the same time redirect example.com/* to example.com/forum/* But I also have /wiki/ and /blog/ and /style/, so I don’t want to redirect example.com/style/* to example.com/forum/style/* This is what I have at the moment, which is not working quite correctly: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond […]

The correct way to make a rewrite rule?

I have a .htaccess in my site www folder that has this rewrite rule: RewriteRule ^(\w+)/?$ /$1.php It works, if you type in http://sampardee.com/urltest – It finds urltest.php and brings it up. However, if you type in http://sampardee.com/urltest/ it still brings urltest.php up but the CSS stops working. I have the CSS file specified in […]