Re: .htaccess help needed
I guess you can use something like;
Code:
RewriteEngine On
RewriteRule ^/(.*) htp://somesite.com/somepage.php [R=301,L]
I haven't tested though.
Re: .htaccess help needed
I can redirect everything it's just the exception of the one directory that is causing the problem.
DJ
Re: .htaccess help needed
Right, I'm not entirely sure how you might be able to do that actually. :/
Re: .htaccess help needed
Quote:
Originally Posted by Dayjo
I guess you can use something like;
Code:
RewriteEngine On
RewriteRule ^/(.*) htp://somesite.com/somepage.php [R=301,L]
I haven't tested though.
I have just spent all day making fancy smashy urls work for http://lordmatt.co.uk so I think I can help (there is a post about it on the front page at the moment).
You will need two rules:
Code:
RewriteRule ^cpanel(.*)$ http://etc/cpanel/$1 [L,NC]
RewriteRule ^(.*)$ http://otherdomain.com/$1 [L,NC]
rule one is case insensitive and redirects the cpanel directory to iteself (silently) and more importantly the [L] directive stops .htaccess from doing any more mod_rewrites on the URL.
If we didn't make it to cpanel then we must be the otehr case (everything else). The second one makes all calls to the current domain go to otherdomain.com (add your own here) AND it will pass over any other instructions etc so myfirstone.com/folder/special.html would now map to otherdomain.com/folder/special.html
If this is not wanted remove the $1 from towards the end of the second line.
if you want people to know that everything has moved than unhide the rewrite and make [L,NC] become [R=301,NC] which redirects with the permanant moved message. (good for search engines).
You will need to have
at the begining of the file and it would not hurt to have
Code:
Options +FollowSymlinks
before that
this gives us
Code:
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^cpanel(.*)$ http://etc/cpanel/$1 [L,NC]
RewriteRule ^(.*)$ http://otherdomain.com/$1 [L,NC]
This should work as it is based one what I've done for old dead links on my site (the dead links are on other people sites).
Re: .htaccess help needed
Hi Matt
Unfortunately I've given your suggestion a try and it seemed to do nothing! Any ideas why?
Cheers
DJ