Welcome to WebmasterWorld Guest from 34.228.143.13

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

htaccess rewrite help

     
6:19 pm on Apr 3, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 10, 2000
posts:2151
votes: 0


I'm using htaccess (or trying to at least) to rewrite a call to my root domain to a script I am using to generate my site. IE:
RewriteEngine on
RewriteRule ^(.*)$ /cgi-bin/script.cgi/$1

I'm sure you htaccess gurus can already see the problem. All my image links are rewritten as well to domain.com/cgi-bin/script.cgi/images/image.gif and so on. Can this be avoided just for the images folder?

8:04 pm on Apr 3, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


oilman,

Add a rewrite condition to exclude the images directory requests:


RewriteEngine on
RewriteCond %{REQUEST_URI} !^/images
RewriteRule ^(.*)$ /cgi-bin/script.cgi/$1 [L]

Jim

8:10 pm on Apr 3, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 10, 2000
posts:2151
votes: 0


jeez - I knew it would be something simple - works like a charm :) Thanks Jim. I really should learn more about htacces one of these days.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members