I'm creating a game website which is organized by folders.
The main sections sections exist on the main directory.
example: public_html/about/
The game sections exist in a games directory
example: public_html/games/worldofwarcraft
Using mod rewrite I've been able to go to the games directory without having to type in "games" in the url.
example:
www.domain.com/worldofwarcraft/ goes to www.domain.com/games/worldofwarcraft/
Now, when I go to the home page I want it to redirect to public_html/home/ but instead it's being redirected to public_html/games/home/ where it obviously returns an error.
Here is my code:
Code:
- Code: Select all
Options + FollowSymlinks
RewriteEngine on
RewriteCond $1 !^(games|layout|about|contact|affiliate_program) RewriteRule ^(.*) games/$1 [L]
Did you guys have any suggestions on how to do this?