PDA

View Full Version : Redirect-Thought this was fixed HELP!


aurora
06-26-2006, 10:27 PM
HELP!!
Please tell me what am doing wrong.
pointing an add-on domain to the main site.

Ok so I thought this was fixed but tonight I had a surprise. The redirect took me to a site with a SIMILAR name.

What is up with that?

This is what I have in my - .htaccess in the add-on domain to point to my main domain. This site is being eliminated in August.
I am pasting it as is becasue it goes to ytown.com sometimes.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^ytownpc.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.ytownpc.com$
RewriteRule ^(.*)$ http://mahoningvalley.info [R=301,L]

This is what I have in my - .htaccess in the main domain.

RewriteEngine on
rewritecond %{http_host} ^www\.mahoningvalley\.info [nc]
rewriterule ^(.*)$ http://mahoningvalley.info/$1 [r=301,nc]

RedirectMatch permanent ^/ytownpc/$ http://mahoningvalley.info

aurora

Zonteck
06-27-2006, 12:47 AM
Hi there, I was unable to force it to display ytown.com, at least using something like this (HTTP://YTOWNPC.CoM/BLAH/Beeee/e).

Regardless, a cleaner version of your subdomains redirect would be...

RewriteEngine on
RewriteCond %{HTTP_HOST} ytownpc\.com [nc]
RewriteRule (.*) http://mahoningvalley.info/$1 [R=301,L,nc]


Your main domain's htaccess just no-www class b (http://no-www.org/faq.php#how_class_b)'s your domain and redirects the directory. Anyway, try using the cleaner htaccess I've provided, but otherwise your redirects seem to be fine..

aurora
06-27-2006, 08:28 AM
Thank you so much for replying.
I feel beter now.
I have not been able to reproduce it since yesterday.
It must have been some kind of hiccough. I was stunned.
I was concerned because people confused the two sites all the time...
and then I start sending them there!

Will the suggested text also point the WWW visitors for the add on?
I pulled my hair out because the google results that had WWW in them were pulling up error pages and one of my pages for a calendar was redirecting to my forum BUT incorrectly so errors resulted ...it was very weird.
I fixed it by adding the second directive.
The whole episode is detailed rather confusingly in my other long and drawn out post on this board earlier in the day.

I added the WWW redirect on the main site because I use joomla and the WYSIWYG editor for visitors is quirky about being called from a point different from the live site listed in config. I don't know if I'm making sense with that.

aurora