htaccess question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I know it's not a php question, but I can't readily find the answer elsewhere.

I want to make this directive universal. Put htaccess file on any host in any folder.

This works
RewriteEngine On

RewriteCond %{SERVER_PORT} !=443

RewriteRule ^(.*)$ https://www.foo.org/bar/$1 [R=301,L]  #Here the foo.org and /bar must be specified

I want what is in effect

RewriteRule ^(.*)$ https://{host_name}/{directory}/$1 [R=301,L]

I can easily do this with php regex capturing the (host and dir) and then rewriting the text string; but the Apache directives are not obvious.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux