#Hide Index
IndexIgnore *
#Define ErrorDoc
ErrorDocument 404 http://www.domain.com
#REDIRECTS
Redirect 301 /page.php http://domain.com
Redirect 301 /inc/page.php http://domain.com
Options +FollowSymlinks
RewriteEngine on
#Redirect all pages in a folder to a single URL
RewriteRule ^dir/(.*)$ http://domain.com/index.php [L,R=301]
#Redirect String
RewriteRule ^index.php?var1=value&var2=(.*)
I have the following on my .htaccess file within /var/www/html folder.
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.net [nc,or]
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com\.au [nc,or]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=permanent, NC, L]
I want all domain.net and domain.com.au requests to redirect to domain.com.
I installed Redmine and so far everything runs smoothly.
Now i want to add a rewrite rule via .htaccess in order to redirect requests from domain.tdl to www.domain.tdl.
This is approach works fine with my everyday php projects:
RewriteEngine On
RewriteBase /
# redirect all pages w/o www to www.
RewriteCond %{HTTP_HOST} !^www\.domain\.tdl$
RewriteRule ^(.*)$ http://www.domain.tdl/$1 [L,R=301]
All of the names currently point to the same web server folder which is correct. That is, the domain.net, domain.org, etc all work without redirecting to the main .com
How do I get visits to the .org and .net to redirect the browser to domain.com?
This should be basic, but I am can't figure out the best approach.
I am trying to have GitList (PHP web viewer for git) and GIT Smart HTTP(S) under the same domain git.domain.ext. The following is the actual setup:
GIT Smart HTTP URLs are the form git.domain.ext/git/reponame.git
GitList is served through git.domain.ext/gitlist
So far, so good.
I am trying to redirect only my top level domain eg. domain.com to sub.domain.com.
i have a domain www.mydomain.com. it is hosted in apache.
when i hit this domain, it takes me to apache default page.
I know this must have been answered a million times but I can't seem to get it to work
I would like to redirect a subdomain to a subdirectory.
I am currently using
server {
server_name sub.domain.com;
rewrite ^(.*) http://www.domain.com/sub-directory permanent;
}
If I navigate to sub.domain.com I am redirected to http://www.domain.com
EDIT
Here's my full config.
Hello Friends!
I wonna ask you
I have to change my domain name.
I know how to make redirect and change robots.txt
But other things I do not know well:
1). Do I have to add my new domain name (which will be the main name) as a parked domain name or as an additional domain name.
2). What should I do with hosting folders?