Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
htaccess help required - thanks in advance
Old 06-24-2010, 10:25 AM htaccess help required - thanks in advance
saxamo's Avatar
Junior Talker

Posts: 1
Name: Stephen
Location: under the ground
Trades: 0
Hello there,

New the the forums and hoping not only to get some help but to give some help as well. I could really use some input on my htaccess files. Yes, files. Currently running a website out of root while another website is being created in a subfolder. Once the new site is complete the htaccess file on root will point any calls to root to the subfolder thus making the subfolder the root of the server.

I am going to post a message I sent to another person I had the opportunity to talk to. Unfortunately he did not know the best way to go about this from what I have so far. No, I can't move the new website to the root and have just one htaccess file. Well, let me just post the message and hope for the best

______________________________________

I have a question for you. I need help with my htaccess file based on your stop image hotlinking article.

http://www.davidairey.com/stop-image...king-htaccess/

I am going to try and make this short. I have a working webpage at the moment on the root of my server.

http://www.fabian8.com

this is what is in the htaccess file now.

AddHandler application/x-httpd-php5 .php


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



order allow,deny
deny from all


once I flip the switch to the new site which is located in the wordpress folder

http://www.fabian8.com/wordpress/

The root folder htaccess file will have this in it:

RewriteEngine On
Options +FollowSymlinks

RewriteCond %{HTTP_HOST} fabian8.com$
RewriteCond %{REQUEST_URI} !wordpress/
RewriteRule ^(.*)$ wordpress/$1

and the one inside the wordpress folder will have this in it:

AddHandler application/x-httpd-php5 .php
# BEGIN WordPress

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


# END WordPress

I want to add your code to the site. However, with my little bit of knowledge on htaccess file I am sure there is a better way of doing this. Is there any chance I can get you to provide me with a proper htaccess file based on the information above and the best way to do it.

____________________________________

Can someone please help me design a simple yet elegant htaccess file that incorporates the information above and this bit of code:

Here’s how to deter the thieves

You need to add some code into your .htaccess file, which should be in your website’s root directory.


RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png|jpg)$ /images/nohotlink.jpe [L]




In my case, I changed the mysite text above to davidairey, and you would add your own domain here.


Then I created a custom image titled nohotlink.jpe, and uploaded it to my /image/ folder. Notice the file extension .jpe – this is because .jpeg and .jpg files are now blocked from appearing on third party websites, but this exception allows you to show your custom image.

Information was copied from http://www.davidairey.com/stop-image...king-htaccess/ for proper credit.

I want to thank anyone that can help or direct me properly on this. If any more information is required please don't hesitate to ask here, send me a pm or snap your fingers.

Thanks again for any help

Kind regards,
Saxamo
saxamo is offline
Reply With Quote
View Public Profile Visit saxamo's homepage!
 
 
Register now for full access!
Old 06-24-2010, 10:33 AM Re: htaccess help required - thanks in advance
kayleigh's Avatar
Average Talker

Posts: 20
Name: kayleigh
Location: /discount
Trades: 0
This link can help you a bit: www.askapache.com
__________________
DomainSiteShop | Realtime Domain registration and webhosting - Montly discounts

Please login or register to view this content. Registration is FREE

Hight performance dedicated servers:
Please login or register to view this content. Registration is FREE
kayleigh is offline
Reply With Quote
View Public Profile Visit kayleigh's homepage!
 
Reply     « Reply to htaccess help required - thanks in advance
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.12915 seconds with 12 queries