Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End PHP Switch/Case and the Dreaded Unclean URLs

  • This topic is empty.
Viewing 15 posts - 31 through 45 (of 64 total)
  • Author
    Posts
  • #128838
    CrocoDillon
    Participant

    Maybe try

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?page=$1 [NC,L]

    #128839
    rpotterjr
    Participant

    Ok, can you write that into what I posted, because I have a feeling I’m missing something…

    #128840
    rpotterjr
    Participant

    Actually, ya know what that last change you made to the mod_rewrite fixed it…

    #128841
    rpotterjr
    Participant

    You Rock CrocoDillon! lol Thanks soo much! Now, I just need to figure out the active navigation link part…

    #128844
    CrocoDillon
    Participant

    You’re welcome, glad it finally works :)

    Something like:

  • >Portfolio
  • could work.

#128845
rpotterjr
Participant

That throws off a crap load of parsing errors… :(

#128847
rpotterjr
Participant

Should be able to use jQuery to set Active Navigation, but so far everything I try is only highlighting the ‘home’ link.

#128850
CrocoDillon
Participant

For the parse errors I’d need to see the whole file where you create the menu.

Nice catch about the $page variable Ben :)

#128851
rpotterjr
Participant

I have tried what is shown here:

https://css-tricks.com/snippets/jquery/add-active-navigation-class-based-on-url/

However, in my case it is not working…

#128852
rpotterjr
Participant

The menu is simply this in html:

http://pastebin.com/gB2uHSDH

#128853
rpotterjr
Participant

Chris used to have something on here showing a way to do this with jQuery by link id, but I can’t find the shit.

#128854
CrocoDillon
Participant

Because you don’t have the / that’s in the jQuery selector. I’d prefer a php solution over a js one though.

#128855
rpotterjr
Participant

I found his version before and modified it and it worked, but I lost all my files due to a electrical crash of my backup server…

#128856
CrocoDillon
Participant

The menu can’t be simple html, else you wouldn’t get parse errors.

#128857
rpotterjr
Participant

Yeah. I tried the above php method, but it didn’t do anything. It just cause some php perrors. I can try it again…

Viewing 15 posts - 31 through 45 (of 64 total)
  • The forum ‘Back End’ is closed to new topics and replies.