Try this: RewriteCond %{HTTP_HOST} ^. +\. Tld\.
Com$ NC RewriteRule ^/(.+)$ tld.com/$1 R=301,L Or you can use this string to check if it root: RewriteCond %{THE_REQUEST}! ^A-Z{3,9}\ /\ HTTP.
No luck.. Redirect long and short urls :( – the_ghost Apr 13 at 23:20.
For some unknown reason the most reliable for checking variable was %{THE_REQUEST}, not %{REQUEST_URI}. %{THE_REQUEST} contains raw browser's query to web-server: for example, GET /anypage. Html HTTP/1.1, if you are opening url anysite.com/anypage.html.So, hear you are complete working rule-set for .
Htaccess: RewriteCond %{HTTP_HOST} ^. +\. Tld\.
Com$ RewriteCond %{THE_REQUEST} ^get\ /(.+)\ http. * NC RewriteRule ^(.+) http://tld.com/$1 R=301,L.
I have subdomains: sub1.tld.com, sub2.tld.com and so on. This subdomains contain important info. But I want to prevent opening any other urls, for example: sub1.tld.com/anypage or sub2.tld.com/dir/more/anyurl.html.
This urls must be redirected to main domain tld.com: tld.com/anypage or tld.com/dir/more/anyurl. This set of rules works as expected (redirects sub1.tld.com/anypage to tld.com/anypage) but also redirects sub1.tld.com to tld.com. Where is the error?
2nd string is wrong?
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.