GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   I need some help with my htaccess. Coders and programmers, please help! (https://gfy.com/showthread.php?t=837496)

tranza 06-26-2008 12:00 PM

I need some help with my htaccess. Coders and programmers, please help!
 
This is the deal, I installed WordPress on my server, and wanted the archives and categories to have their own folders, created automatically by WordPress (like www.tranzagals.com/2008/archives-1/).

So I copied the code from WordPress and pasted on my .htaccess

This is the code:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


And this is how my .htaccess file looked like with this addition:

order allow,deny
allow from all

Options +FollowSymLinks

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?tranzagals.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?frenchcum.com(/)?.*$ [NC]
RewriteCond %{REMOTE_ADDR} !^208.99.195.175 [NC]
RewriteRule \.(jpe?g|gif|bmp|png)$ - [F,NC,L]

ErrorDocument 400 http://www.2.livejasmin.com/freechat...psprogram=REVS
ErrorDocument 403 http://www.2.livejasmin.com/freechat...psprogram=REVS
ErrorDocument 404 http://www.2.livejasmin.com/freechat...psprogram=REVS
ErrorDocument 500 http://www.2.livejasmin.com/freechat...psprogram=REVS
ErrorDocument 501 http://www.2.livejasmin.com/freechat...psprogram=REVS
ErrorDocument 503 http://www.2.livejasmin.com/freechat...psprogram=REVS

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


But it seems that immediately after I uploaded this file, my server started to respond real slow, and eventually all my sites on that server was down.

Do you guys know what I did wrong? Or what might have caused this?

Thanks for the help guys!

Socks 06-26-2008 12:02 PM

I'm not technical, but those look like modrewrite rules for PHP.. Do you have that turned on?

And do you want to send all your 404 traffic to livejasmin?

tranza 06-26-2008 12:04 PM

Quote:

Originally Posted by Socks (Post 14380102)
I'm not technical, but those look like modrewrite rules for PHP.. Do you have that turned on?

No idea. How can I check that?

Quote:

Originally Posted by Socks (Post 14380102)
And do you want to send all your 404 traffic to livejasmin?

Yes I do.

:thumbsup

pornguy 06-26-2008 12:18 PM

If you dont have PHP working on the server WP will not work.

tranza 06-26-2008 12:21 PM

Quote:

Originally Posted by pornguy (Post 14380154)
If you dont have PHP working on the server WP will not work.

I have PHP working and WP is working on my server.

I have a problem when I change the way permalinks are displayed. That's all.

What Socks said makes sense. I should change some of the permissions. I just don't know which ones!

Socks 06-26-2008 12:25 PM

I asked my programmer here for you Tranza, and you need to turn it on in your php.ini? If you didn't install it with PHP, you may have to re-install, but she thinks you can turn it on after install.. But not sure. If you just installed PHP, it may be easier to just re-install it with mod_rewrite enabled.

ScriptWorkz 06-26-2008 12:29 PM

You have two sets of rewrite rules in your .htaccess, i didn't even look that close, i know the familiar ones from wordpress but i didn't take the time to figure out the other ones. Chances are your creating a condition where it keeps rewriting to itself and endlessly loops.

EDIT - looks like the other ones are anti-hotlinking, remove them temporarily to see if it fixes the problem then you can worry about how to make both sets co-exist.

Socks 06-26-2008 12:33 PM

Also why are these rules different?

RewriteCond %{HTTP_REFERER} !^http://(www\.)?tranzagals.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?frenchcum.com(/)?.*$ [NC]

tranza 06-26-2008 01:14 PM

Quote:

Originally Posted by Socks (Post 14380211)
Also why are these rules different?

RewriteCond %{HTTP_REFERER} !^http://(www\.)?tranzagals.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?frenchcum.com(/)?.*$ [NC]

Yes, they are. One of them is for my own domain, and the other for one know TGP to hotlink from my site.

I'll check out what your coder said and what ScriptWorkz said too.

mrwilson 06-26-2008 01:18 PM

This should be of some help;
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

AmateurFlix 06-26-2008 02:10 PM

Quote:

Originally Posted by tranza (Post 14380112)
No idea. How can I check that?

name the following file phpinfo.php
PHP Code:

<?php
phpinfo
();
?>

load it in your browser & search for "mod_rewrite"
if that does not appear under "Loaded Modules", then you do not have it installed.

remove phpinfo.php as soon as you are done with it - there is no reason to let hackers see how your configuration is set up.

I'm not 100&#37; certain I'm correct about this, but 99.5% ;)

tranza 06-26-2008 02:18 PM

Quote:

Originally Posted by AmateurFlix (Post 14380660)
name the following file phpinfo.php
PHP Code:

<?php
phpinfo
();
?>

load it in your browser & search for "mod_rewrite"
if that does not appear under "Loaded Modules", then you do not have it installed.

remove phpinfo.php as soon as you are done with it - there is no reason to let hackers see how your configuration is set up.

I'm not 100% certain I'm correct about this, but 99.5% ;)

Thanks for that. I'll try it.


All times are GMT -7. The time now is 09:06 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123