Forum Moderators: phranque
Example
===
- client type in his browser:
www.site.com/dir1/dir2/dir3/doc.html
- and browser redirects him to:
www.site.com/index.php
BUT! URL already typed in Address_Line (in browser) have to stay like original ('mod_rewrite' can do it?)
Please, can you advise me how to solve such a problem?
But i need "original" url stay without any changes and at the same time my script starts.
So don't care what i've type in browser line:
- www.site.com/dir1/
- www.site.com/1.html
- www.site.com/dir2/dir3 (without trailing slash)
i need this lines (urls) stay unchanged.
And only this script (www.site.com/index.php) will get all this requests.
---
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^(.*)$ [localhost...] [L]
---
But redirection is not silent. I mean that url in browser changes :(((
Some ideas?
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /start.html [L]
But if you want to make this rewriting only to display a page when a resource is not found, then use the ErrorDocument instead. See [httpd.apache.org...]