Advertisement:

Author Topic: Moving URL to new subdomain: Need HELP  (Read 228019 times)

stanjohn123

  • Jr. Member
  • **
  • Posts: 76
Moving URL to new subdomain: Need HELP
« on: July 18, 2013, 09:12:40 am »
Dear all,

I posted this thread in the general help section and didn't get much help. Guess it was the wrong section to start this topic as some friends tried their best to help me. So I'm posting it here to see if someone can offer better help.

"So basically what I want to do is move my existing URL from www.website.com/classified to new subdomain www.classified.website.com

The thing is, I easily moved my myBB website url to new subdomain as they had step by step guide or documentation on their website and cpanel configuration was as easy as taking a walk in the park.

But for OSclass I could not find any info for configuration on the OSClass admin configuration. Can someone please guide me how to do this.

Also can some one tell me how I can disable the old URL so it does not show in google search index."

Thanks.
Modify message

raess

  • Full Member
  • ***
  • Posts: 240
Re: Moving URL to new subdomain: Need HELP
« Reply #1 on: July 20, 2013, 07:25:12 pm »
Hi.
In .htaccess try this
Code: [Select]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^website.com/classified [NC]
RewriteRule ^(.*)$ http://classified.website.com/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^www.website.com/classified  [NC]
RewriteRule ^(.*)$ http://www.classified.website.com/$1 [L,R=301]
</IfModule>


stanjohn123

  • Jr. Member
  • **
  • Posts: 76
Re: Moving URL to new subdomain: Need HELP
« Reply #2 on: July 20, 2013, 11:16:12 pm »
Hi.
In .htaccess try this
Code: [Select]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^website.com/classified [NC]
RewriteRule ^(.*)$ http://classified.website.com/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^www.website.com/classified  [NC]
RewriteRule ^(.*)$ http://www.classified.website.com/$1 [L,R=301]
</IfModule>

Hi Raess,

     Thanks for the help. I tried the above code but once I enter classifieds.wheelnmotor.com ,but it still redirects me to my home website www.wheelnmotor.com , the only change I did was I put the actual website where you have mentioned website.

     What do I do now ?

osCanyon

  • Hero Member
  • *****
  • Posts: 701
  • osCanyon, the class of Osclass
Re: Moving URL to new subdomain: Need HELP
« Reply #3 on: July 30, 2013, 06:19:35 pm »
are you actually at www.website.com/classified ??
or is this an an example? when visiting www.website.com/classified or classified.website.com
looks like a service of some sort..

so on to the next, did you actually create a sub-domain called classifieds?
in the config file you need to change the path of the site
last line
define('WEB_PATH', 'http://classifieds.whateveryourdomainname is.com/');

stanjohn123

  • Jr. Member
  • **
  • Posts: 76
Re: Moving URL to new subdomain: Need HELP
« Reply #4 on: July 31, 2013, 01:14:55 am »
are you actually at www.website.com/classified ??
or is this an an example? when visiting www.website.com/classified or classified.website.com
looks like a service of some sort..

so on to the next, did you actually create a sub-domain called classifieds?
in the config file you need to change the path of the site
last line
define('WEB_PATH', 'http://classifieds.whateveryourdomainname is.com/');

Hi DC,

      Sorry for not being clear. That was just an example. My website is www.wheelnmotor.com/classifieds . I have created the subdomain already which is classifieds.wheelnmotor.com . However I do not know what settings I should change to make it work.

     I tried changing the path of the site as you have mentioned above but I'm getting an error as "this webpage has a redirect loop" , Please help  :(


frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: Moving URL to new subdomain: Need HELP
« Reply #5 on: July 31, 2013, 01:50:11 am »
@stanjohn123

Did you edit config.php file (domain change) ?

stanjohn123

  • Jr. Member
  • **
  • Posts: 76
Re: Moving URL to new subdomain: Need HELP
« Reply #6 on: July 31, 2013, 08:26:08 am »
@stanjohn123

Did you edit config.php file (domain change) ?

Dear Frosticek,

    Can you please tell me what exactly to change in the config.php file ?

stanjohn123

  • Jr. Member
  • **
  • Posts: 76
Re: Moving URL to new subdomain: Need HELP
« Reply #7 on: July 31, 2013, 10:54:24 pm »
For http://www.vbazare.sk I have in config.php this:
define('WEB_PATH', 'http://www.vbazare.sk/');

when I want to move to subdomain classified.vbazare.sk, I would change it to:
define('WEB_PATH', 'http://www.classified.vbazare.sk/');

Yes i tried this but I'm getting an error , " THIS WEBSITE HAS A REDIRECT LOOP " , Maybe there is something else also I should change. Can some one please tell me what else other than this that I should change ?

osCanyon

  • Hero Member
  • *****
  • Posts: 701
  • osCanyon, the class of Osclass
Re: Moving URL to new subdomain: Need HELP
« Reply #8 on: August 02, 2013, 07:39:57 am »
try Clearing your cookies for this site
sometimes is folder permissions....
can you try with different browser?
and are you using Chrome?
list you url?

stanjohn123

  • Jr. Member
  • **
  • Posts: 76
Re: Moving URL to new subdomain: Need HELP
« Reply #9 on: August 02, 2013, 11:33:56 pm »
try Clearing your cookies for this site
sometimes is folder permissions....
can you try with different browser?
and are you using Chrome?
list you url?

Hi DC,

   Yes I am using chrome. I cleared all my cookies , still not working. I tried same thing in Internet Explorer, even that is not working.

My URL is www.wheelnmotor.com/classifieds and my new subdomain is classifieds.wheelnmotor.com

osCanyon

  • Hero Member
  • *****
  • Posts: 701
  • osCanyon, the class of Osclass
Re: Moving URL to new subdomain: Need HELP
« Reply #10 on: August 02, 2013, 11:54:48 pm »
seeing you already have the site in a folder called 'classifieds' making a sub-domain with that same name """should""
just do the dns switch and all be fine, as is now when I go to classifieds.wheelnmotor.com, I get looped back to the main site wheelnmotor.com.
again what does your config.php say on the last line?
this should be in that path
classifieds.wheelnmotor.com

stanjohn123

  • Jr. Member
  • **
  • Posts: 76
Re: Moving URL to new subdomain: Need HELP
« Reply #11 on: August 03, 2013, 09:18:52 am »
seeing you already have the site in a folder called 'classifieds' making a sub-domain with that same name """should""
just do the dns switch and all be fine, as is now when I go to classifieds.wheelnmotor.com, I get looped back to the main site wheelnmotor.com.

I'm very sorry , I changed the last path of the config file back to initial setting because I don't know when  you would see it and my users would think something is wrong if they tried entering it as it's weekend here and users will use more these days. Please post here when you see this and I will change it to classifieds.wheelnmotor.com and keep it like that for 8-10 hours , after that I will change back to whatever you tell me.


Or here is a screen shot attachment when I change the last line as below on Chrome and IE,

Here is the code for last line for the errors i got as per photos.

Code: [Select]
/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Table prefix */
define('DB_TABLE_PREFIX', 'os_');

define('REL_WEB_URL', '/classifieds/');

define('WEB_PATH', 'http://www.classifieds.wheelnmotor.com/');

?>





osCanyon

  • Hero Member
  • *****
  • Posts: 701
  • osCanyon, the class of Osclass
Re: Moving URL to new subdomain: Need HELP
« Reply #12 on: August 03, 2013, 06:40:26 pm »
sud-domains are created in the control panel and add a dns switch
In theory, this subdivision can go down to 127 levels deep, and each DNS label can contain up to 63 characters, as long as the whole domain name does not exceed a total length of 255 characters

so a sub-domain will act the same as domain name
 when installing a script the path isnt mydomain.com/myscript  but myscript.mydomain.com

Please try this and post back when you have it up, ok?


define('REL_WEB_URL', '/');

define('WEB_PATH', 'http://www.classifieds.wheelnmotor.com/');
dont think you need the www. either ......but maybe

like this
define('REL_WEB_URL', '/');

define('WEB_PATH', 'http://classifieds.wheelnmotor.com/');

stanjohn123

  • Jr. Member
  • **
  • Posts: 76
Re: Moving URL to new subdomain: Need HELP
« Reply #13 on: August 04, 2013, 01:12:01 am »
sud-domains are created in the control panel and add a dns switch
In theory, this subdivision can go down to 127 levels deep, and each DNS label can contain up to 63 characters, as long as the whole domain name does not exceed a total length of 255 characters

so a sub-domain will act the same as domain name
 when installing a script the path isnt mydomain.com/myscript  but myscript.mydomain.com

Please try this and post back when you have it up, ok?


define('REL_WEB_URL', '/');

define('WEB_PATH', 'http://www.classifieds.wheelnmotor.com/');
dont think you need the www. either ......but maybe

like this
define('REL_WEB_URL', '/');

define('WEB_PATH', 'http://classifieds.wheelnmotor.com/');

Dear DC,

      Thanks a Ton. It really worked without putting www as you said. Can't believe it.

      But now the issue is when I enter the my old link www.wheelnmotor.com/classifieds it goes to http://classifieds.wheelnmotor.com/classifieds/ instead of just classifieds.wheelnmotor.com and I get the error page as attached.

     Also when I tried to do a redirect in my cpanel from the old link to new subdomain i get the following error.
You cannot redirect "classifieds" to "http://classifieds.wheelnmotor.com" as this will cause a redirection loop because "/home/wheeln5/public_html/classifieds" is at the same place as "/home/wheeln5/public_html/classifieds". How do I solve this so my customers will be redirected to my new subdomain ?

Thanks for your patience and support DC. Couldn't have done anything without you.

     




osCanyon

  • Hero Member
  • *****
  • Posts: 701
  • osCanyon, the class of Osclass
Re: Moving URL to new subdomain: Need HELP
« Reply #14 on: August 04, 2013, 02:21:46 am »
well eventually  all will go to classifieds.wheelmotor.com
but normally after changing a sub folder to a sub-domain, the switch is auto and if typed in the old way should still revert to classifieds.wheelmotor.com.
I know because I did the same as you, I had in a sub folder off the public_html folder, decided to make it a sub-domain
then either way I typed the url it came as classifieds.mydomain.com
try this with and without the www
define('WEB_PATH', 'http://www.classifieds.wheelnmotor.com/');