Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 01-19-2005, 11:15 PM
aussiev8 aussiev8 is offline
 
Join Date: Aug 2004
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default what does your .htaccess look like?

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!
Reply With Quote
  #2  
Old 01-19-2005, 11:25 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 01-20-2005, 01:24 AM
aussiev8 aussiev8 is offline
 
Join Date: Aug 2004
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 01-20-2005, 08:21 AM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by aussiev8
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 ...
Reply With Quote
  #5  
Old 08-31-2005, 05:18 PM
loftyasianz loftyasianz is offline
 
Join Date: May 2004
Location: philadelphia, pa
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry for forum digging but...

HTML Code:
## 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
Reply With Quote
  #6  
Old 08-31-2005, 06:42 PM
mholtum's Avatar
mholtum mholtum is offline
 
Join Date: May 2004
Location: Arizona
Posts: 697
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is mine. It is set to display an image that i determine regardless of the image being linked

Code:
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]
Reply With Quote
  #7  
Old 09-02-2005, 05:51 PM
loftyasianz loftyasianz is offline
 
Join Date: May 2004
Location: philadelphia, pa
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 09-02-2005, 06:33 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mholtum
Here is mine. It is set to display an image that i determine regardless of the image being linked

Code:
 
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?
Reply With Quote
  #9  
Old 09-03-2005, 12:44 AM
Talisman's Avatar
Talisman Talisman is offline
 
Join Date: Aug 2002
Location: USA/West Coast
Posts: 371
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 10-27-2005, 01:13 AM
divided_by_fear's Avatar
divided_by_fear divided_by_fear is offline
 
Join Date: Oct 2005
Posts: 451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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]
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:57 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04749 seconds
  • Memory Usage 2,255KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete