开发者

mod_rewrite and iframe problems

开发者 https://www.devze.com 2023-02-12 17:07 出处:网络
I am currently using .htaccess to create a directory based website with pretty links, ie. www.website.com/home, website.com/portfolio.

I am currently using .htaccess to create a directory based website with pretty links, ie. www.website.com/home, website.com/portfolio.

On one of the pages I have an iframe, and the .htaccess is overriding the iframe src.

Is it possible to tell .htaccess to not rewrite if开发者_StackOverflow社区rame sources?


No, mod_rewrite rewrite rules affect all HTTP requests. Apache doesn't know the request originated from an iframe. Either use a URL for the iframe that doesn't match one of your rewrite rules, or alter the rewrite rule to not match the URL you don't want rewritten.

0

精彩评论

暂无评论...
验证码 换一张
取 消