I have to manage a huge web site which has coded with absolute paths like:
<a href='http://www.samewebsite.net/anotherPage.cfm'>link to another page in the site.</a>
Now, as I previously said, the web site has many pages and I'm not paid for changing manually all the absolute URLs into relatives. Someone suggested me to try use the mod_rewrite Apache to get rid of them. I checked Apache docs and tried this:
RewriteEngine On
RewriteRule www.samewebsite.net localhost
but it doesn't work nor in .htaccess file nor in httpd.conf inside the VirtualHost directive. I guess it's a matter of regexpressions, but I'm not sure of it. How can i solve this?
Thank you.
Mod_rewrite will not change your HTML. You need an output filter http://httpd.apache.org/docs/2.2/mod/mod_ext_filter.html
Manually? Why not write a simple script?