Reputation: 251
In order to make nice and friendly SEO links I'm using this:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)\.html$ page.php?ida=$1&idb=$2 [QSA]
So http://www.example.com/solutions/hardware.html will be: http://www.example.com/page.php?ida=solutions&idb=hardware
This works.
But the problem is there is no graphic element downloaded! (Inline images and css background), The font style and none graphic style applied well since the css style section is not in a separate css file but it's embeded in my header section page.
Is there any helpful lines to be added in my .htaccess file so therefore images/
directory would be axcepted?
Help please i'm new in .htaccess!
Thanks,
Upvotes: 1
Views: 1460
Reputation: 655269
Relative URLs are now resolved from /solutions/hardware.html
and not /page.php?ida=solutions&idb=hardware
. That means a reference with a relative URL path like images/foobar
would be resolved to /solutions/images/foobar
and not to /images/foobar
.
Just use absolute URL paths like /images/foobar
to reference your external resources and the references are independent from the path of your base URL.
Upvotes: 3
Reputation: 5291
Try:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)\.html$ page.php?ida=$1&idb=$2 [QSA]
Upvotes: 0