Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 12-22-2004, 04:45 AM   #1
Mr. Mike
Confirmed User
 
Join Date: Aug 2004
Posts: 913
HELP! with Pico please.

How can I edit multiple files at once?

the star is not working.
__________________
Sig for sale. ICQ: 163-545-054
Mr. Mike is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2004, 04:48 AM   #2
Apache_A
Confirmed User
 
Join Date: May 2004
Posts: 434
Is that possible?
__________________
ICQ:2116226
Apache_A is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2004, 04:52 AM   #3
notjoe
Confirmed User
 
Industry Role:
Join Date: May 2002
Location: Toronto, Canada
Posts: 5,599
Quote:
Originally posted by Mr. Mike
How can I edit multiple files at once?

the star is not working.

Why not run screen?
notjoe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2004, 04:53 AM   #4
Mr. Mike
Confirmed User
 
Join Date: Aug 2004
Posts: 913
Im hoping it is.

Well, here is my problem, I cant keep uploading an htaccess file to every virtual domain, everytime I change it. Problem is, I cant get my htaccess code to work in apache. All I can work is the error docs.

I need to get these to function:

Deny from {ip}

and

RewriteRule .*\.(gif|GIF|Gif|jpg|JPG|jpeg)$ http://www.mydomain.com/error.jpg [R,NC]

but everytime I add these lines, apache dies
__________________
Sig for sale. ICQ: 163-545-054
Mr. Mike is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2004, 04:55 AM   #5
Mr. Mike
Confirmed User
 
Join Date: Aug 2004
Posts: 913
Quote:
Originally posted by notjoe
Why not run screen?
command screen? What does that do? If its a cut and paste job, it would still be kind of a pain cause thats over 100 files to paste.
__________________
Sig for sale. ICQ: 163-545-054
Mr. Mike is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2004, 05:18 AM   #6
notjoe
Confirmed User
 
Industry Role:
Join Date: May 2002
Location: Toronto, Canada
Posts: 5,599
Quote:
Originally posted by Mr. Mike
command screen? What does that do? If its a cut and paste job, it would still be kind of a pain cause thats over 100 files to paste.
Screen is(like) a multitasking program which allows you to basically run multiple shells from under your login and by using keys you can switch from shell to shell to shell.

As for your apache problem, make sure that you're not trying to set something which can only be set from the httpd.conf file.
notjoe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2004, 05:22 AM   #7
swedguy
Confirmed User
 
Industry Role:
Join Date: Jan 2002
Posts: 7,981
A quick and dirty!

I tried to get it to a one-liner but I must've missed something. This way works at least.

Create a file that is called "edit.sh" and add this to it:

Quote:
#!/bin/bash

echo "Deny from someip" >> $1
echo "RewriteRule .*\.(gif|GIF|Gif|jpg|JPG|jpeg)$ http://www.mydomain.com/error.jpg [R,NC]" >> $1
The ">>" will append the text to the .htaccess. Change it to ">" if you want to over write.

Change the file to "chmod 755 edit.sh".

Now run this from the main directory where you can find the .htaccess files:

Quote:
find . -name .htaccess -maxdepth 2 -exec ./edit.sh {} \;
Change "./edit.sh" to the correct path to edit.sh.
"-maxdepth 2" will only look for .htaccess maximum 2 directories deep, change to suit your needs.

DISCLAIMER!
If you fuck up, I'm not responsible
It worked for me. So try it in a test directory first and see if it will look the way you want it.
swedguy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.