What is wrong with my .hacces file? can pay 3$ if u want

Discussion in 'PHP' started by nevret2, Apr 18, 2008.

  1. #1
    hello,

    i have a problem, i have a wordpress site in /home/1

    in this i have dirs as wp-includes/wp-content/wp-admin, with all plugins/themes/php files in it

    i have created home/4, and didnt uploaded the dirs here above, i want them read from home/1

    so i tried the next .hacces file:


    RewriteEngine On
    
    RewriteCond %{REQUEST_URI} ^/tvt$
    RewriteRule . /home/4/ [L,R=301]
    
    RewriteCond %{REQUEST_URI} !^/home/4/$
    RewriteCond %{REQUEST_URI} !^/home/4/wp-admin/$
    RewriteCond %{REQUEST_URI} !^/home/4/wp-content/$
    RewriteCond %{REQUEST_URI} !^/home/4/wp-include/$
    RewriteCond %{REQUEST_URI} !^/home/4/index.php$
    RewriteRule ^(.+) /home/1/$1
    Code (markup):
    but it gives the next problem:

    
    Warning: require(/home/nevret/public_html/yourdepo/home/4/wp-includes/compat.php) [function.require]: failed to open stream: No such file or directory in /home/nevret/public_html/yourdepo/home/4/wp-settings.php on line 200
    
    Fatal error: require() [function.require]: Failed opening required '/home/nevret/public_html/yourdepo/home/4/wp-includes/compat.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/nevret/public_html/yourdepo/home/4/wp-settings.php on line 200
    Code (markup):
    what did i do wrong?

    hope someone can help, if u want i have 3$ in my paypal, i can send to u

    thnx,
     
    nevret2, Apr 18, 2008 IP
  2. pagespank

    pagespank Peon

    Messages:
    52
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hmm, you want users who go to home/4 to see the wordpress content from home/1? Not sure what the first 'tvt' rule's for, but try the below:

    RewriteEngine On
    
    RewriteCond %{REQUEST_URI} ^/tvt$
    RewriteRule .* /home/4/ [L,R=301]
    
    RewriteRule ^home/4/(.*) home/1/$1 [QSA]
    
    Code (markup):
     
    pagespank, Apr 18, 2008 IP
  3. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #3
    is your problem solved?

    If not please say so

    Regards

    Alex
     
    kmap, Apr 18, 2008 IP
  4. nevret2

    nevret2 Peon

    Messages:
    518
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    well it must use his own config file in home/4 not that one of home/1, it must only use the folders i have used here above from home/1

    but i have tried your code and it gives an error:

    Warning: require(/home/nevret/public_html/yourdepo/home/4/wp-includes/compat.php) [function.require]: failed to open stream: No such file or directory in /home/nevret/public_html/yourdepo/home/4/wp-settings.php on line 200

    Fatal error: require() [function.require]: Failed opening required '/home/nevret/public_html/yourdepo/home/4/wp-includes/compat.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/nevret/public_html/yourdepo/home/4/wp-settings.php on line 200
     
    nevret2, Apr 18, 2008 IP
  5. nevret2

    nevret2 Peon

    Messages:
    518
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    no its not hope i get get solved this, thnx
     
    nevret2, Apr 18, 2008 IP
  6. matthewrobertbell

    matthewrobertbell Peon

    Messages:
    781
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I don't think you'll want .htaccess, as you'll be include()ing some php files, try symbolic linking them maybe?
     
    matthewrobertbell, Apr 19, 2008 IP