Posted on: 05/27/05 06:52am
By: garfy
Hi i want that if someona comes from my second url to my site he would be redirected to my first url
Is it possible to do some hack code in index php in public_html
please give me the detailed instruction please
Problem is i can not login if i came from second url that points to the same geeklog.
thank you
redirecting URL problem
Posted on: 05/27/05 02:21pm
By: Dirk
This is best done on the server (we had a redirect hack in earlier versions of Geeklog and it caused a lot of problems ...).
If you're on an Apache webserver, put this in your .htaccess:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule (.*) http://www.example.com/$1 [L,R]
Obviously replacing "www.example.com" with the domain name of your site.
bye, Dirk
redirecting URL problem
Posted on: 05/27/05 02:27pm
By: garfy
where is that file exactly is it on server do i have to use mysql
redirecting URL problem
Posted on: 05/27/05 07:46pm
By: garfy
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.alternativecomplementarymedicine.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule (.*) http://www.altermedicine.org/$1 [L,R]
i put this in a txt file in my public html
the file name is htaccess.txt and it is not working
did i do a mistake
redirecting URL problem
Posted on: 05/27/05 08:19pm
By: geKow
[QUOTE BY= garfy]
the file name is htaccess.txt and it is not working
did i do a mistake[/QUOTE]
YES!
.
.
.
.
ok, ok... the filename must be ".htaccess" nothing more and nothing less
geKow
redirecting URL problem
Posted on: 05/27/05 08:32pm
By: garfy
I chenged the file nam on server and it disapeared and i can not find it
and at the same time i can not open my site anymore
WHERE is the file gone
redirecting URL problem
Posted on: 05/27/05 08:38pm
By: geKow
wich program are you using to access your server? Since .htaccess is rated as a system file, it is hidden under some circumstances. So if you have an option to show hidden files in your ftp, it should be back.
geKow
redirecting URL problem
Posted on: 05/27/05 08:45pm
By: garfy
[QUOTE BY= geKow] wich program are you using to access your server? Since .htaccess is rated as a system file, it is hidden under some circumstances. So if you have an option to show hidden files in your ftp, it should be back.
geKow[/QUOTE]
Ok i see it is hidden file but website is not working i get the mesage it can not be open because URI was overstepped or something
I put this inside
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.alternativecomplementarymedicine.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule (.*) http://www.altermedicine.org/$1 [L,R]
i want the first domain to be redirected into the second so is everything ok or mistake again
redirecting URL problem
Posted on: 05/27/05 09:01pm
By: garfy
This stuff is so hard
I managed to fix it 50 %
It redirects from second to first now, but if i try to open first url directly it puts me into this
http://www.alternativecomplementarymedicine.com//home/altermed//public_html/
why it puts me into home directory
redirecting URL problem
Posted on: 05/27/05 09:15pm
By: garfy
OK now i fixed it 70 %
It redirects ok but i can not login, what is wrong??
I tried to change site setting url to this new one and the site was without layout
also i tried to change cookie url and nothing opened
redirecting URL problem
Posted on: 05/28/05 09:49am
By: Dirk
Both domain namens in the .htaccess should be the same - the one you want to use for your site. And you should use that same domain in $_CONF['site_url'] then.
bye, Dirk