I was wondering if the ReWriteEngine was active. The following lines don't seem to be working as expected
(redirecting people trying to access
http://mydomain.com/imprimir/tabla-romanos.pdf
to
http://mydomain.com/imprimir/numeros-romanos.html
and so on.
)
Options -Indexes
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule tabla-romanos.pdf$ http://mydomain.com/imprimir/numeros-romanos.html [R,L]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule tablas-de-multiplicar.pdf$ http://mydomain.com/logo/tablas-de-multiplicar.html [R,L]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule ejercicios-multiplicacion.pdf$ http://mydomain.com/imprimir/ejercicios-multiplicacion.html [R,L]
Which server is your site on?
Mod_rewrite is active and functional on that server. Are the rules you have active axactly as you posted here or is that just a generic example?
Quote from: Dynaweb on December 01, 2007, 03:26:53 AM
Mod_rewrite is active and functional on that server. Are the rules you have active axactly as you posted here or is that just a generic example?
Currently no,
they are:
RewriteEngine on
Options -Indexes
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com$ [NC]
RewriteRule .*\.(pdf)$ http://mydomain.com/imprimir/ [R,NC]
But I prefer to have the ones I posted in my first post, because they are specific. They didn't work.
Quote from: Dynaweb on December 01, 2007, 03:26:53 AM
Are the rules you have active axactly as you posted here or is that just a generic example?
the only difference is that I use the actual name of my domain.
Hello,
I have checked the rules provided by you. Can I get the URL where you are getting error and the errors. Also I want to complete rules with real domain name so that I'll investigate the issue further.
Thank You.
Yes, I guess there isn't any problem with publishing that information, the actual file is:
RewriteEngine on
Options -Indexes
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?neoparaiso.com/.*$ [NC]
RewriteRule ejercicios-multiplicacion.pdf$ http://neoparaiso.com/imprimir/ejercicios-multiplicacion.html [R,L]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?neoparaiso.com/.*$ [NC]
RewriteRule tabla-romanos.pdf$ http://neoparaiso.com/imprimir/numeros-romanos.html [R,L]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?neoparaiso.com/.*$ [NC]
RewriteRule tablas-de-multiplicar.pdf$ http://neoparaiso.com/logo/tablas-de-multiplicar.html [R,L]
the problem is that, using those rules, when I type in the address bar of the browser something like:
http://neoparaiso.com/logo/tablas-de-multiplicar.pdf
The browser downloads the pdf instead of redirecting to the
http://neoparaiso.com/logo/tablas-de-multiplicar.html