It is currently Fri May 25, 2012 7:24 pm

News News of Apache mod Rewrite

Site map of Apache mod Rewrite » Forum : Apache mod Rewrite

Discussions about Apache mod Rewrite, .htaccess, Use, experiences ... URL Rewriting.

.htaccess help please

I want to prevent hotlinking of images and media on my site.

I would like it so that any hotlinked files are simply not displayed, any directly linked files (with referrer info) result in the user being redirected to my home page and any cases with blank referrer info resulting in the image being displayed.

I want to allow display of images on my own domain (www.ohlookaforum.com) and on a couple of my blogs (ohlookaforum.blogspot.com and ohlookaforum.wordpress.com)

Is this code correct? -

Options -Indexes
Options +FollowSymLinks

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} .*jpg$|.*gif$|.*png$|.*mp3$|.*wav$|.*swf$|.*mp4$|.*mpg$|.*flv$|.*avi$|.*bmp$|.*jpeg$|.*mpeg$ [NC]
RewriteCond %{HTTP_REFERER} ...
Read more : .htaccess help please | Views : 794 | Replies : 6


redirecting index.php to /

Well i don't want the mysite.net/forum.html so i did not use the index.php rewrite

I have this already in my hsaccess
Code: Select all
RewriteCond %{HTTP_HOST} !^mysite\.net$ [NC]
RewriteRule ^(.*)$ http://mysite.net/$1 [QSA,L,R=301]

Redirecting all www to non www
but i also want to redirect the mysites.net/index.php to mysites.net
Read more : redirecting index.php to / | Views : 707 | Replies : 1


$_POST not working after .htaccess change $_POST not working after .htaccess change

After making changes in my .htaccess post variables are not working in PHP pages.
Anyone had this before?
Thanks!

This is my new htaccess file:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^www\.website\.com$
RewriteRule ^onderhoud/(.*).htm$ _system/onderhoud/index.php?p=$1
RewriteRule ^()()/(.*).htm? _system/index.php?p=$3&short=$1$2
RewriteRule ^(.*)\.htm$ _system/index.php?p=$1
RewriteRule ^(.*)\.css? _system/style.php?file=$1
Read more : $_POST not working after .htaccess change | Views : 1774 | Replies : 1


Add on domains robots and more problems

OK i don't know how to write all this down but i will try.

Ok here how it begins i have a phpbb3 forum installed with the seo advance mod, on the root of the server(shared server).
And well i host in godaddy which allows you to add domains to your account once you link them to a folder.
The second domain has wordpress installed.

Ok here's the errors i got recently from google in my site maps saying something about robots timeout this just happened recently.
The other problem is that the .htaccess file that is located in the ...
Read more : Add on domains robots and more problems | Views : 696 | Replies : 1


mod rewrite & perl conflict (403 forbidden)

I moved my forum in a new server (Plesk 9.0.1 powered) and have the followimg problem:
When try to run any kind of perl (.pl) file Im getting a 403 Forbidden Error.
When commented (#) the RewriteEngine On at htaccess everything worked fine.
In my error_log I got the following:

Code: Select all
Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /var/www/vhosts/xxxxxxxxx.com/httpdocs/test/perl/test.pl


I also try to uncomment the Options +FollowSymlinks in htaccess and also put
AllowOverride All in /var/www/vhosts/xxxxxxxxx.com/conf/vhost.conf
but nothing.
Any idea?
Read more : mod rewrite & perl conflict (403 forbidden) | Views : 1074 | Replies : 2


 

Login  •  Register


Statistics

Total posts 41127 • Total topics 8563 • Total members 15417