Results 1 to 3 of 3

Thread: [Question] Using .htaccess to bypass certain pages?

  1. #1
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default [Question] Using .htaccess to bypass certain pages?

    This has been asked several times and I'm not sure if this will do it...

    I've been googling .htaccess stuff and found an article on how to bypass or gain control over certain pages for things like wordpress which also uses virtual directories. http://striderweb.com/nerdaphernalia/20 ... -htaccess/

    The virtual pages in vShare are, I believe, created by the .htaccess RewriteRule much in the same way. I want the page a person sees after they login to NOT be their profile page, but some other page, like the welcome page that they get when they click the link in the welcome email (invite_friends.tpl) OR the main page (anything other than their profile page).

    :?: Would something like this be driven by .htaccess and how would one go about redirecting them with it? I think it has to do with this part of the .htaccess:

    Code:
    RewriteRule ^([^/\.]+)?/?$ user.php?username=$1 [L,QSA]
    If it's not fun, stop doing it!

  2. #2
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: [Question] Using .htacces to bypass certain pages?

    OK, here's what I was able to dig up so far.

    I commented out the RewriteRule for user.php and put in a different one:

    Code:
    #RewriteRule ^([^/\.]+)?/?$ user.php?username=$1 [L,QSA]
    RewriteRule ^([^/\.]+)?/?$ invite_friends.php?welcome=$1 [L,QSA]
    This works for when a person logs in, they go to the invite_friends welcome page, only problem is now they can not access their profile or anyone else's at all. The only way they can access their own profile is if they access the URL /my_profile.php . I think it has to do with conditions, but I don't know how to do it...yet.

    During my search, I found a very cool page that generates .htaccess for you which I think is the neatest thing since sliced bread:

    http://www.southeasttelephone.com/tools ... cessor.php

    So, it's back to more digging unless there's an .htaccess guru out there who can help with this, I'd be ever so grateful (and I'm sure so would the rest of the vShare community).
    If it's not fun, stop doing it!

  3. #3
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: [Question] Using .htaccess to bypass certain pages?

    Well, I figured out something else in the meantime. I wanted extra pages for my site which are in a subdirectory, but didn't want to have to type in "index.php" all the time. When I access the admin page, I noticed that we don't have to put in admin/index.php to go there, so I took a look at the .htaccess to find out why and this is what I found in it:

    Code:
    RewriteRule ^admin$ - [L]
    RewriteRule ^admin/(.*) - [L]
    Now that I have a subdirectory in my vshare, all I have to do is put

    Code:
    RewriteRule ^share$ - [L]
    RewriteRule ^share/(.*) - [L]
    and it goes to the share pages without having to put in "index.php" each time. :D Works GREAT for my "contact" page which is in a subdirectory called "contact".
    If it's not fun, stop doing it!

Similar Threads

  1. .htaccess
    By jiffyspop in forum Installation Support
    Replies: 1
    Last Post: 09-08-2008, 04:42 AM
  2. .htaccess problem, and pages not loading because of it.
    By techtutorial in forum Installation Support
    Replies: 2
    Last Post: 10-09-2007, 02:59 AM
  3. Please Help question about .htaccess
    By brenea in forum General Discussions
    Replies: 3
    Last Post: 09-04-2007, 04:26 AM
  4. Copy of htaccess
    By bdwebb in forum Installation Support
    Replies: 1
    Last Post: 08-07-2007, 01:47 PM
  5. .htaccess
    By ostendo in forum Installation Support
    Replies: 5
    Last Post: 05-08-2007, 06:13 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •