View Full Version : what does your .htaccess look like?
aussiev8
01-19-2005, 11:15 PM
hey guys,
i don't know much about .htaccess and was wondering if its even needed?
can someone give me an example of there's??
thanks!
Andreas
01-19-2005, 11:25 PM
One rewrite rule to have all domains pointing to the main one (to avoid cookie trouble) and a set of rewriteing conditions/rule to prevent hotlinking images.
aussiev8
01-20-2005, 01:24 AM
alright!
can i have an example, as i said i know little about how htaccess rules work..
is it worth learning? i figure i'll use it once and thats it
Colin F
01-20-2005, 08:21 AM
alright!
can i have an example, as i said i know little about how htaccess rules work..
is it worth learning? i figure i'll use it once and thats it
Here's a rather good tutorial about htaccess: http://www.javascriptkit.com/howto/htaccess.shtml
Actually you can do tons of things with it, from password protection to redirection to redirection with mod rewrite to blocking IPs to ...
loftyasianz
08-31-2005, 05:18 PM
sorry for forum digging but...
## Altsounds.com Member re-write Hack Version1
## All music fans should check out altsounds.com for lots of free music to listen to!!
# turn the Apache MOD_REWRITE engine on
RewriteEngine On
# this first rule will catch the "blank" entry into the
# Forums directory, taking the user to the main forum page - change as appropriate
RewriteRule ^$ index.php
# this next entry will catch everything else and pass
# it to the member.php engine for processing in
# the "member" section
RewriteRule (^[-_A-Za-z0-9\ ]*$) member.php?&username=$1
this code allows me to access user's profiles with http://www.mysite.com/username and this works fine. the only problem with it is that the pictures dont show up. that is their avatar pictures, their profile pictures, and signatures. they are stored in image.php (or are called by image.php sorry i dont know much about the way vbulletin works).
does anyone know if it would be possible to access user's profiles in this fashion and also get the images to show?
thanks in advance,
warren
mholtum
08-31-2005, 06:42 PM
Here is mine. It is set to display an image that i determine regardless of the image being linked :)
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://journal.ravensrealm.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://journal.ravensrealm.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://ravensrealm.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://ravensrealm.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.journal.ravensrealm.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.journal.ravensrealm.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.ravensrealm.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.ravensrealm.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.cclhosting.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.cclhosting.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.broadbandreports.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.broadbandreports.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.dslreports.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.dslreports.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ http://www.ravensrealm.net/quitstealing/birdie2.jpg [R,NC]
loftyasianz
09-02-2005, 05:51 PM
thanks but this is kind of the opposite of what i want to do...
right now, mines redirects http://www.mysite.com/username to http://www.mysite.com/forums/member.php?blah blah blah
this part works fine and all of the text shows up in the profile. the thing that doesnt work are the profile pictures and the avatar.
can anyone help me out?
thanks in advance,
warren
Boofo
09-02-2005, 06:33 PM
Here is mine. It is set to display an image that i determine regardless of the image being linked :)
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://journal.ravensrealm.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://journal.ravensrealm.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://ravensrealm.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://ravensrealm.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.journal.ravensrealm.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.journal.ravensrealm.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.ravensrealm.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.ravensrealm.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.cclhosting.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.cclhosting.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.broadbandreports.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.broadbandreports.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.dslreports.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.dslreports.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ http://www.ravensrealm.net/quitstealing/birdie2.jpg [R,NC]
I LOVE that birdie2 pic. LOL
Wanna share? ;)
Talisman
09-03-2005, 12:44 AM
Haha. When I saw the thread, I wondered why you'd want to show one image... regardless. Then I looked at the pic. LOL ... very cute. Now, I'll have to make something for my new site that's... um, a bit less enthusiastic. ;)
Cheers.
divided_by_fear
10-27-2005, 01:13 AM
sorry to bring up such a old topic but on the rewrite rule could you add zip in there? kinda like this
RewriteRule \.(gif|jpg|js|css|zip)$ - [F]
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.