1

I'm trying to grasp apache mod_rewrite

When I add this to my .htaccess it silently (url doesnt change) shows page bob.htm

RewriteEngine on
RewriteRule index.htm bob.htm

I.e. If I type this in the browser address: http://mydomain/test/index.htm, I get the content for page: http://mydomain/test/bob.htm

However if I change the .htaccess to use the full path ...

RewriteEngine on
RewriteRule index.htm http://mydomain/test/bob.htm

It redirects, but not silently. Can someone explain what's going on please.

1 Answer 1

1

When using relative paths Apache performs an internal rewrite (eg. index.htm becomes bob.htm). When using complete paths Apache performs an external redirect (eg. the url changes).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.