: Creating sub-directories in public_html without effecting higher scope files ( index.php ) I have in my Navigation bar: "example.co/index.php (home), example.co/action.php, example.co/car.php /etc".
I have in my Navigation bar:
"example.co/index.php (home), example.co/action.php, example.co/car.php /etc".
Now I have my games in the "/games/" directory
But once I click on a game in /games/ directory "example.co/games/mario" //(that's what I want my games to be called)
EVERYTHING on the page scopes to games/ directory. For example example.co/index.php becomes example.co/games/index.php
example.co/games/action.php
(It shouldn't do that. It should remain example.co/index.php)
And then things start breaking 404 error.
I don't know if .htaccess is exactly necessary. But I believe I could make this work if I put EVERYTHING In public_html directory. and then used .htaccess to change games/ name. But I don't know the code to use...
Perhaps something along the lines of
# Rewrite for (ALL the games).php
RewriteRule ^games/(ALL the games).php [NC,L]
Any ideas? I'm just clueless there's 1000 possibilities here... I'd rather not drive myself crazy moving unnecessary files around.
More posts by @Murray432
1 Comments
Sorted by latest first Latest Oldest Best
Your links within your navigation are relative and not absolute. For example:
<div id="NavBar"><a href="index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Home','','images/images/Nav_Over_01.gif',1)"><img src="images/Nav_Bar_01.gif" alt="Home" width="119" height="44" id="Home" /></a>
versus:
<div id="NavBar"><a href="/index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Home','','images/images/Nav_Over_01.gif',1)"><img src="images/Nav_Bar_01.gif" alt="Home" width="119" height="44" id="Home" /></a>
...where I put a / before index.php. See if that helps.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.