.htaccess - Redirecting domain with htaccess -


I'm going to .co.uk from my site .com version The only issue is that there are some admin features that I want to keep on the .com site. I have set up my .htaccess to redirect everything but the requested files and directories are present, which works fine except for the root of the site, I can not redirect it.

Here my HTAC ...

RETURNEIGN ON REVERTABESE / REVIRATE RULES ^ index \ .php $ http://www.site.co.uk/ [R = 301, L] rewrite% {REQUEST_FILENAME}! - F. Revoked% {REQUEST_FILENAME}! -d Rev. Rule (. *) Http://www.site.co.uk/$1 [R = 301, L]

You can use this code:

  RewriteEngine On RewriteBase / RewriteRule ^ (index \ .php)? $ Http: //www.site.co.uk/ [R = 301, L] RERETE condom% {REQUEST_FILENAME}! -f Rewrite Convert% {REQUEST_FILENAME}! -D rewritere (. *) Http://www.site.co.uk/$1 [R = 301, L]  

This regex ^ (index \ .php) ? $ will mail index.php or empty string (landing page).


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -