• Hi, I am trying to add a simple banner/contents frameset to my blog, so that a menu I have works across application.

    To try to get this to work, I have changed my .htaccess file so that the rewrite rule goes to index.htm rather than index.php. The normal index.php is then made into the “content” frame in the frameset.

    This generally works ok, when a user finds a blog entry in a search engine and clicks on it, the banner with the story – or category- appears in the “contents” frame as it should, and the banner frame with the menu appears on top as it should.

    The problem comes in when someone clicks a second blog entry or category- then the banner frame appears twice. I think possibly this can be fixed if there is some way to specify “_top” in the rewrite rule, so whenever an entry is clicked it will produce the complete “index.htm” frameset on the top level. I’m sure this is possible, I just don’t know the syntax. Current .htaccess file is below- could someone help me out.

    Thank you

    Rob

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /news/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /news/index.htm [L]
    </IfModule>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The correct “syntax” is – don’t use frames. It’s that simple.

    That yellow left sidebar with the horizontal scrollbar – looks horrible, and makes the site unusable.

    Thread Starter robmarkg

    (@robmarkg)

    Does anyone know how to do this? It doesn’t seem like it should be that big of a deal, but this thread has already been censored, To reiterate the censored portion, I am not looking for an unsolicited critique of my website, nor am I looking for some debate about frames- I thought people were over that about 10 years ago. Apparently the people who can dish it out, can’t take it.

    All I would just like to know is how to specify “_top” in the .htaccess file so I can try this approach and see if it works.

    Thank you

    Rob

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    nor am I looking for some debate about frames- I thought people were over that about 10 years ago

    Oh, no, they are over it. Frames disappeared about 7 years ago. Nobody seriously uses those techniques anymore, because they’re bad for SEO and user experience.

    All I would just like to know is how to specify “_top” in the .htaccess file so I can try this approach and see if it works.

    You can’t do it like this, and it doesn’t work. It’s really just that simple. Make your RewriteRule point to index.php. Failure to do this causes exactly what you see now. There’s no getting around it.

    Now, if you want the index.htm to have priority when no specific index is specified, then add this to the top of the .htaccess file (after you fix the rewrite rule to point at index.php correctly):

    DirectoryIndex index.htm index.php

    That will give the index.htm file priority when both exist in the directory and neither has been explicitly specified.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Specify _top in .htaccess file’ is closed to new replies.