OT: Apache Mod rewrite rules
I'd have the host investigate why the images
aren't serving in the first place rather than
trying to fix it with a rewrite. The rewrite
looks fine assuming the condition is satisfied
but maybe the condition isn't being satisfied.
David
Don wrote:
> Hi,
>=20
> I have a problem with a site where as if I type:
> <A HREF ="http://www.mydomain.com">http://www.mydomain.com</A>
> it displays the page but not the images
>=20
> However, if I type:
> <A HREF ="http://www.mydomain.com/">http://www.mydomain.com/</A>
> it displays the page and the images fine.
>=20
> As it's a trailing slash problem, I placed the following in
> my .htaccess file:
> RewriteEngine on
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} -d
> RewriteRule ^(.+[^/])$ $1/ [R]
>=20
> Then I restarted Apache but the non-slashed URL is not
> redirecting or adding the
> slash. Can someone check my rules above for any error?
>=20
> Thanks,
> Don
>=20
>=20
>=20
I'd have the host investigate why the images
aren't serving in the first place rather than
trying to fix it with a rewrite. The rewrite
looks fine assuming the condition is satisfied
but maybe the condition isn't being satisfied.
David
Don wrote:
> Hi,
>=20
> I have a problem with a site where as if I type:
> <A HREF ="http://www.mydomain.com">http://www.mydomain.com</A>
> it displays the page but not the images
>=20
> However, if I type:
> <A HREF ="http://www.mydomain.com/">http://www.mydomain.com/</A>
> it displays the page and the images fine.
>=20
> As it's a trailing slash problem, I placed the following in
> my .htaccess file:
> RewriteEngine on
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} -d
> RewriteRule ^(.+[^/])$ $1/ [R]
>=20
> Then I restarted Apache but the non-slashed URL is not
> redirecting or adding the
> slash. Can someone check my rules above for any error?
>=20
> Thanks,
> Don
>=20
>=20
>=20
Comment