*Need Help with PHP*

Discussion in 'PHP' started by swoopo, Nov 28, 2010.

  1. #1
    My sites user login page .com/login says: The requested URL /login was not found on this server.

    But when i type in .com/login.php "using .php" it shows the login page and i can login, this is the same for all the pages that avaliable when loggedin, I checked my root and theres no directory for login, i created a login directory but i dont no what files i have to put in it or what i need to do to sort this problem.

    Other pages a fine, its just the pages when loggedin

    Also this is a problem i have to sort my self, so i need some help on how to do this.

    Thank You
     
    swoopo, Nov 28, 2010 IP
  2. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #2
    Just change the login link to login.php ?
     
    MyVodaFone, Nov 28, 2010 IP
  3. swoopo

    swoopo Peon

    Messages:
    71
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi, I have thought of that, but i have this problem on many pages when loggedin
     
    swoopo, Nov 28, 2010 IP
  4. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #4
    Does the site have a .htaccess file maybe your host doesn't allow it.

    Do you have a .htaccess file ?
     
    MyVodaFone, Nov 28, 2010 IP
  5. swoopo

    swoopo Peon

    Messages:
    71
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    yes i do have htaccess file
     
    swoopo, Nov 28, 2010 IP
  6. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #6
    Post the file here so someone can check it over, also whats the name of your hosting company ?
     
    MyVodaFone, Nov 28, 2010 IP
  7. swoopo

    swoopo Peon

    Messages:
    71
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    swoopo, Nov 28, 2010 IP
  8. swoopo

    swoopo Peon

    Messages:
    71
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    here the htaccess file

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^profile/(.*)/(.*) profile.php?id=$1&name=$2



    RewriteRule ^confirmemail/(.*) confirmemail.php?code=$1
    RewriteRule ^resetpassword/(.*) resetpassword.php?code=$1
    RewriteRule ^resendconfirmation/(.*) resendconfirmation.php?userid=$1

    RewriteRule ^login$ login.php
    RewriteRule ^signup$ register.php
    RewriteRule ^logout$ logout.php

    RewriteRule ^home$ home.php
    RewriteRule ^update$ viewupdate.php
    RewriteRule ^updates$ viewupdates.php
    RewriteRule ^followers$ viewfollowers.php
    RewriteRule ^following$ viewfollowing.php
    RewriteRule ^inbox$ inbox.php

    RewriteRule ^explore$ recentupdates.php
    RewriteRule ^community$ newmembers.php

    RewriteRule ^myprofile$ myprofile.php
    RewriteRule ^design$ design.php
    RewriteRule ^privacy$ privacy.php
    RewriteRule ^alerts$ alerts.php

    RewriteRule ^search$ search.php
    RewriteRule ^searchmembers$ searchchannels.php
    RewriteRule ^searchupdates$ searchupdates.php

    RewriteRule ^forgot$ forgot.php

    RewriteRule ^rss$ rss_updates.php
    RewriteRule ^invite$ invite_friends.php

    </IfModule>

    <IfModule mod_security.c>
    # Turn off mod_security filtering.
    SecFilterEngine Off

    # The below probably isn't needed,
    # but better safe than sorry.
    SecFilterScanPOST Off
    </IfModule>
     
    swoopo, Nov 28, 2010 IP
  9. swoopo

    swoopo Peon

    Messages:
    71
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    i have added my htaccess file
     
    swoopo, Nov 28, 2010 IP
  10. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #10
    Try this :

    
    
    <IfModule mod_rewrite.c>
    Options +FollowSymLinks
    
    RewriteEngine on
    
    RewriteBase /
    
    RewriteCond %{REQUEST_FILENAME} !-f
    
    RewriteCond %{REQUEST_FILENAME} !-d
    
    RewriteRule ^profile/(.*)/(.*) profile.php?id=$1&name=$2
    
    
    
    RewriteRule ^confirmemail/(.*) confirmemail.php?code=$1
    RewriteRule ^resetpassword/(.*) resetpassword.php?code=$1
    RewriteRule ^resendconfirmation/(.*) resendconfirmation.php?userid=$1
    
    RewriteRule ^login$ login.php
    RewriteRule ^signup$ register.php
    RewriteRule ^logout$ logout.php
    
    RewriteRule ^home$ home.php
    RewriteRule ^update$ viewupdate.php
    RewriteRule ^updates$ viewupdates.php
    RewriteRule ^followers$ viewfollowers.php
    RewriteRule ^following$ viewfollowing.php
    RewriteRule ^inbox$ inbox.php
    
    RewriteRule ^explore$ recentupdates.php
    RewriteRule ^community$ newmembers.php
    
    RewriteRule ^myprofile$ myprofile.php
    RewriteRule ^design$ design.php
    RewriteRule ^privacy$ privacy.php
    RewriteRule ^alerts$ alerts.php
    
    RewriteRule ^search$ search.php
    RewriteRule ^searchmembers$ searchchannels.php
    RewriteRule ^searchupdates$ searchupdates.php
    
    RewriteRule ^forgot$ forgot.php
    
    RewriteRule ^rss$ rss_updates.php
    RewriteRule ^invite$ invite_friends.php
    
    </IfModule>
    
    <IfModule mod_security.c> 
       # Turn off mod_security filtering. 
       SecFilterEngine Off 
    
       # The below probably isn't needed, 
       # but better safe than sorry. 
       SecFilterScanPOST Off 
    </IfModule>
    Code (markup):
    Or this one without the <if condition

    
    
    Options +FollowSymLinks
    
    RewriteEngine on
    
    RewriteBase /
    
    RewriteCond %{REQUEST_FILENAME} !-f
    
    RewriteCond %{REQUEST_FILENAME} !-d
    
    RewriteRule ^profile/(.*)/(.*) profile.php?id=$1&name=$2
    
    RewriteRule ^confirmemail/(.*) confirmemail.php?code=$1
    RewriteRule ^resetpassword/(.*) resetpassword.php?code=$1
    RewriteRule ^resendconfirmation/(.*) resendconfirmation.php?userid=$1
    
    RewriteRule ^login$ login.php
    RewriteRule ^signup$ register.php
    RewriteRule ^logout$ logout.php
    
    RewriteRule ^home$ home.php
    RewriteRule ^update$ viewupdate.php
    RewriteRule ^updates$ viewupdates.php
    RewriteRule ^followers$ viewfollowers.php
    RewriteRule ^following$ viewfollowing.php
    RewriteRule ^inbox$ inbox.php
    
    RewriteRule ^explore$ recentupdates.php
    RewriteRule ^community$ newmembers.php
    
    RewriteRule ^myprofile$ myprofile.php
    RewriteRule ^design$ design.php
    RewriteRule ^privacy$ privacy.php
    RewriteRule ^alerts$ alerts.php
    
    RewriteRule ^search$ search.php
    RewriteRule ^searchmembers$ searchchannels.php
    RewriteRule ^searchupdates$ searchupdates.php
    
    RewriteRule ^forgot$ forgot.php
    
    RewriteRule ^rss$ rss_updates.php
    RewriteRule ^invite$ invite_friends.php
    
    
    
    <IfModule mod_security.c> 
       # Turn off mod_security filtering. 
       SecFilterEngine Off 
    
       # The below probably isn't needed, 
       # but better safe than sorry. 
       SecFilterScanPOST Off 
    </IfModule>
    Code (markup):
     
    MyVodaFone, Nov 28, 2010 IP
  11. swoopo

    swoopo Peon

    Messages:
    71
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    it is still the same
     
    swoopo, Nov 28, 2010 IP
  12. swoopo

    swoopo Peon

    Messages:
    71
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Please any one i still need help none of the above has worked
     
    swoopo, Nov 28, 2010 IP