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)
-   -   Question on rewrite rules - APACHE (https://gfy.com/showthread.php?t=794287)

mikesouth 12-22-2007 11:45 PM

Question on rewrite rules - APACHE
 
Ok I have wordpress running and it has a bunch of rewrite rules

on the same site I have added a members section with its own .htaccess which is your standard require valid user htaccess file

problem is the directory is inheriting the rewrite rules of the parent

I tried adding rewriteengine off at the top of the .htaccess in the child but it didnt have any effect

how do i cancel the rewrite rules for the child so that my members area works (currently gets a 404 error that shows up in wordpress) even though the html file exists and is readable

if i do turn the rewriteengine off is there something I need to do to make apache see it? Im lost on this stuff


Thanks

teksonline 12-22-2007 11:52 PM

any subdirectory of a parent directory with a new .htaccess file should take the new ruleset, sounds to me like a web server configuration problem in this regards somehow...

mikesouth 12-22-2007 11:55 PM

yes i understand this what I want to do is essentially turn off the rewrite rules in that subdirectory but I want to keep them in the parent and all other subdirectories

mikesouth 12-22-2007 11:56 PM

thats why I thought simply putting rewriteengine off in the subdirectory would do the trick...but it didnt and I dont understand why...is it some sort of caching issue?

teksonline 12-23-2007 12:00 AM

no, you shouldnt have to turn it off, a empty .htaccess would mean no rules..... put any membership rules of course whatever is/was there.

you have to check httpd.conf for how you have access setup, perhaps there's new features to mod_rewrite for sub directories based on recent security issues, I have not been an freelance admin in some time as
there is no longer a need for such a thing, so I have to say I am a bit out of the loop in the exact problem..

maybe they now require to be setup via <directory> or ifmodule commands to proccess over the parent...

teksonline 12-23-2007 12:04 AM

oh one more thing to consider is the ruleset of the parent .htaccess

for example, maybe the request is being "captured" by the parent .htaccess file thus never executing the subdirectory request.

based on one of the rewriterules catching all or whatever your calling

mikesouth 12-23-2007 12:06 AM

damn well netbilling cant add their stuff because the authentication doesnt work...the hosting company said it doesnt work because of the rewrite rules in the parent.

but none of em can tell me HOW TO MAKE IT WORK

Just damn

mikesouth 12-23-2007 12:09 AM

Quote:

Originally Posted by teksonline (Post 13553784)
oh one more thing to consider is the ruleset of the parent .htaccess

for example, maybe the request is being "captured" by the parent .htaccess file thus never executing the subdirectory request.

based on one of the rewriterules catching all or whatever your calling

I bet this is whats happening....is there a rule that will essentially say

when going to memberdir/index.htm dont fuck with the url or matter of fact dont fuck with any url in site.com/memberdir

I dunno squat about apache

teksonline 12-23-2007 12:10 AM

well i do know your problem is probably this now

RewriteCond &#37;{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

but not being to keen on how wordpress works, i have no immediate idea solution, i will poke around a bit

mikesouth 12-23-2007 12:13 AM

Quote:

Originally Posted by teksonline (Post 13553792)
well i do know your problem is probably this now

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

but not being to keen on how wordpress works, i have no immediate idea solution, i will poke around a bit

yup thats the wordpress .htaccess

and what Im looking to do is build the members area in a child directory called membersarea

the embers area will be completely outside of wordpress once they enter it they leave wordpress for good

mikesouth 12-23-2007 12:17 AM

BTW this does work on my southernbukkake.com site but it was on ccbill and had strongbox on it so it never had a problem for somereason

its a new members area on another site thats having the problem....

teksonline 12-23-2007 12:22 AM

do you have access to the wordpress .htaccess on that old server, i would like to see it

mikesouth 12-23-2007 12:26 AM

its the same as the one you posted and also the same as the one on mikesouth.com which is the site having the problem

I think the difference is in the .htaccess provided by strongbox...its huge and has a ton of stuff I dont understand in it

mikesouth 12-23-2007 12:27 AM

but the problem is I cant have strong box on it till netbilling is set up
and netbilling cant set up until authentication works

teksonline 12-23-2007 12:32 AM

start small

on the new blog, create a subdirectory called test
inside test create a .htaccess
----- .htaccess file
RewriteEngine On
----- end .htaccess file

ok now inside this test directory make a file called moo.html

.... moo.html contents
MOO
... end moo.html

ok now call this file... does it load in your browser and show MOO?

if so,

edit .htacces file in test subdirectory
.... insert this line at end of file
RewriteRule ^moo.html$ /foo.html


no reload moo.html does it redirect to a 404 page? it should meaning
everythign is working fine

teksonline 12-23-2007 12:34 AM

and for a final note, try calling your members section something else, maybe something inside wordpress uses members or a members.php or something thus causign the confliction

mikesouth 12-23-2007 12:41 AM

Quote:

Originally Posted by teksonline (Post 13553837)
start small

on the new blog, create a subdirectory called test
inside test create a .htaccess
----- .htaccess file
RewriteEngine On
----- end .htaccess file

ok now inside this test directory make a file called moo.html

.... moo.html contents
MOO
... end moo.html

ok now call this file... does it load in your browser and show MOO?

if so,

edit .htacces file in test subdirectory
.... insert this line at end of file
RewriteRule ^moo.html$ /foo.html


no reload moo.html does it redirect to a 404 page? it should meaning
everythign is working fine

all this worked perfectly just as you said it should

mikesouth 12-23-2007 12:58 AM

ok now this makes NO sense
i move the members dire and the content into test and I can access it

then I move the .htaccess file (looks like this)

AuthUserFile /home/user/public_html/sitename/cgi-bin/.htpasswd
AuthGroupFile /dev/null
AuthName Members
AuthType Basic
require valid-user

into the dir and it breaks again and stays broken even after I remove the .htaccess file or replace it with one that simply says rewriteengine on

mikesouth 12-23-2007 12:59 AM

I guess I will pick this up tomorrow...I sure dont get it ...I do deeply appreciate your help

teksonline 12-23-2007 01:01 AM

then there's no real problem... all is working fine .htaccess wise.


you can try as suggested above and rename your members subdirectory to something else and see if its functioning the same,

also try calling a html file etc in that subdirectory...
debug from there

teksonline 12-23-2007 01:02 AM

np, the wordpress template or wordpress itself probably is interpreting the members as members.php and taking control from there..

mikesouth 12-23-2007 01:04 AM

it works fine UNTIL I put a .htaccess file in there requiring validation...then iyt breaks...and whats weird is it stays broken even after I remove the .htaccess file completely

mikesouth 12-23-2007 01:05 AM

if ya want Im happy to give you access to it via ssh shoot me an email to [email protected]

mikesouth 12-23-2007 01:06 AM

oh and I dont call it members

teksonline 12-23-2007 01:06 AM

hehe, sounds like browser cache is giving you problem as well..
always hold down ctrl-key when reloading pages...

mikesouth 12-23-2007 01:07 AM

and it broke moo.html

mikesouth 12-23-2007 01:07 AM

Quote:

Originally Posted by teksonline (Post 13553930)
hehe, sounds like browser cache is giving you problem as well..
always hold down ctrl-key when reloading pages...

ok THAT could be

mikesouth 12-23-2007 01:09 AM

BINGO...so now i know why it stays broken....Ok I guess Im staying up after all

at least now I know why my mods to htaccess didnt seem to do anything

teksonline 12-23-2007 01:09 AM

its me from adlt.xxx before someone spoofs me and hacks your box lol

woj 12-23-2007 01:14 AM

just create a subdomain
instead of domain.com/members/
do members.domain.com

teksonline 12-23-2007 01:17 AM

thats no fun

mikesouth 12-23-2007 01:23 AM

ok teksonline...sent

setting up a subdomain might be a good sultion...dont know how to do it but i bet its easier to figure out than this...

Damian_Maxcash 12-23-2007 01:25 AM

I am not great at this stuff - but have you got the SEO URL option turned on?

If you can use short urls like www.mybog.com/mypost then every request will trigger .htaccess to try and rewrite it. If it cant handle it, it will 404.

Probably too simple, but sometimes its the simple things :)

mikesouth 12-23-2007 01:28 AM

im south1226 on aol or yahoo IM btw

mikesouth 12-23-2007 01:30 AM

Quote:

Originally Posted by Damian_Maxcash (Post 13553969)
I am not great at this stuff - but have you got the SEO URL option turned on?

If you can use short urls like www.mybog.com/mypost then every request will trigger .htaccess to try and rewrite it. If it cant handle it, it will 404.

Probably too simple, but sometimes its the simple things :)

I do have that plugin

Damian_Maxcash 12-23-2007 01:37 AM

Quote:

Originally Posted by mikesouth (Post 13553980)
I do have that plugin

I wasnt thinking of the seo plugin - I was thinking of permalinks.

Do you have them turned on?

Remember I might just be confusing the issue - ignore me if you are not sure. :)

But I know that permalinks (in options) will mess around with all urls it trys to read and dosnt understand.... For example if you have added something to .htaccess to make it work with something else.

mikesouth 12-23-2007 01:40 AM

ya i have permalinks set that way too...but sounds like teksonline knows what he is doing...maybe he can be of help

Im friggin lost

teksonline 12-23-2007 01:42 AM

well, i see it works fine.

i see two problems

your .htaccess file is the strangest i have come across that uses
an allow ip structure..

allow ip
allow ip
allow ip
deny

so basically if a surfers ip is not in here, he is denied access to members section ( so i assume you have some sorta software that adds these ip's)

so i go to 2nd problem and most likely culprit
AuthUserFile /usr/home/blah/blah/blah/blah/blah/password/.htpasswd

this is invalid path, so therefor it has nothing to authenticate

mikesouth 12-23-2007 01:45 AM

yer lookin in the wrong dir


that members dir is old and inactive


look at newmembers

teksonline 12-23-2007 01:46 AM

didnt see a newmembers but i did see a newemembers


All times are GMT -7. The time now is 11:26 AM.

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