Buying Quick .htaccess Help - $5

Discussion in 'Programming' started by mcmuney, Jul 16, 2011.

  1. #1
    I'm using the following .htaccess, but having some issues. This is what I need fixed:

    -The rewriterule isn't working. I need them to work. When I add these lines Options +FollowSymLinks
    RewriteEngine on to the .htaccess file, the site is NOT viewable.
    -The deny ip address function is working, but I need to specify the page those users should see.
    -When any bad url/image is typed, I want the user to be taken to a specific page

    
    AddHandler x-httpd-php5 .php
    AddHandler x-httpd-php .php4
    RewriteRule ^(.*) /index.php
    RewriteRule ^profile/(.*)$ /profile_id=$1
    <Limit GET HEAD POST>
    order allow,deny
    deny from 41.206.64.0/19
    deny from 41.207.0.0/19
    deny from 41.207.192.0/19
    deny from 196.47.128.0/18
    deny from 196.201.64.0/19
    deny from 196.223.4.0/24
    deny from 213.136.96.0/19
    deny from 213.150.192.0/19
    deny from 41.208.128.0/18
    deny from 196.1.92.0/24
    deny from 196.1.93.0/24
    deny from 196.1.94.0/24
    deny from 196.1.95.0/24
    deny from 196.1.96.0/24
    deny from 196.1.97.0/24
    deny from 196.1.98.0/24
    deny from 196.1.99.0/24
    deny from 196.1.100.0/24
    deny from 196.207.192.0/18
    deny from 213.154.64.0/19
    deny from 41.83.6.216
    deny from 95.211.10.152
    allow from all
    </LIMIT>             
    
    Code (markup):
    First come, first serve. Thanks!
     
    mcmuney, Jul 16, 2011 IP
  2. xtmx

    xtmx Active Member

    Messages:
    359
    Likes Received:
    12
    Best Answers:
    4
    Trophy Points:
    88
    As Seller:
    100% - 0
    As Buyer:
    100% - 1
    #2
    AddHandler x-httpd-php5 .php
    AddHandler x-httpd-php .php4
    RewriteRule ^(.+)$ /index.php
    RewriteRule ^profile/(.+)$ /profile_id=$1
    
    #block access to invalid pages
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.+)$ /page.php
    
    #repeat for all ips
    RewriteCond %{REMOTE_ADDR} 41.206.64.0/9 [NC]
    RewriteRule $ /denied.php [R=302,L]
    
    Code (markup):
    Try that.
     
    Last edited: Jul 16, 2011
    xtmx, Jul 16, 2011 IP
  3. mcmuney

    mcmuney Well-Known Member

    Messages:
    834
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    128
    As Seller:
    100% - 0
    As Buyer:
    100% - 3
    #3
    It didn't solve either of the 2 issues, thanks for the attempt though.
     
    mcmuney, Jul 16, 2011 IP