-   Linux - Software (
-   -   Apache redirects?! How (

rincewind 02-23-2005 04:12 AM

Apache redirects?! How

Is there possible to redirect an URL in apache to another url..

Lets say that i got the url trail


and want to redirect all of the 58.jpg to

should go to

And make that apply to all of my sites under /demo

Is this possible to do from a .htaccess file (I now NOTHING about thes .htacces files)..=)

Thankful for help,
-- Rincewind

linuxxed 02-23-2005 06:40 AM

Have you looked at mod_rewrite apache module?

rincewind 02-23-2005 07:35 AM

Yeah.. Thanks.. That helped a lot!!!=)

Another question though...

if I have in one of the dir a .htaccess file that looks like this:

RewriteEngine On
RewriteRule ^/pics/(.*)\.jpg$ /?showdbimage=$1

it deos not work..
Any suggestions?

Im working in
Im thinking it has to do that im not in the root directory

Does anyone have any hints for me on how to fix this??
-- Rincewind

linuxxed 02-23-2005 02:43 PM

Check if you've got "AllowOverride None" in your httpd.conf. If yes then it will ignore .htaccess.

Increase log level - think it is RewriteLogLevel. Check logs to see how it is rewriting and why ..

All times are GMT -5. The time now is 04:10 AM.