How can I tell which is being used by the server? I'm just the webmaster, not the server admin.
Generally if you log in to your server you can see (if not modify) the config for your virtual host in /etc/httpd.conf (or /etc/apache2/httpd.conf, or similar).
Where does that go? Can you give me an example for - say:
somedomain.com/index.html
being redirected to:
anotherdomain.com/somedir/somedir/index.html
I think the .htaccess file in / would look something like:
Code:
RewriteEngine On
RewriteRule ^/index.html$ http://anotherdomain.com/somedir/somedir/index.html
Also, is there a way (example please, if yes) of redirecting all requests to one domain to a directory on another domain, even if the pages only exist on the other domain that is being redirected to?
Certainly:
Code:
RewriteRule ^/(.*) http://anotherdomain.com/somedir/somedir/$1
They're just standard regular expressions, although the syntax differs slightly (which always confuses me) due to there being so many reserved characters for regex commonly found in URLs.
Bookmarks