Some problems

Using a single web hosting account to host multiple sites

Postby torgheh » Thu Oct 09, 2008 3:02 pm

richardk wrote:Try the following in a /.htaccess
Code: Select all
DirectoryIndex index.html index.php
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^$ /index.html [QSA,L]

RewriteCond %{HTTP_HOST} !^www\.toranj-gem\.com$ [NC]
RewriteRule .* http://www.toranj-gem.com%{REQUEST_URI} [R=301,L]


and the following in /en/.htaccess
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^$ /en/index.php [R=301,L]

RewriteCond %{HTTP_HOST} !^www\.toranj-gem\.com$ [NC]
RewriteRule .* http://www.toranj-gem.com%{REQUEST_URI} [R=301,L]


so sorry
i dont undretood your question correctly

and i have this problem now

in the "en"

this link is not shown link's content and redirect to main domain !
http://www.toranj-gem.com/en/turquoise.html
in the root i have to addresse :
www.toranj-gem.com
www.toranj-gem.com/index.html

and this address not work !

www.toranj-gem.com/index.php
torgheh
 
Posts: 16
Joined: Thu Oct 09, 2008 5:23 am

Postby torgheh » Thu Oct 09, 2008 3:16 pm

so sorry

i have many problems now
with this code :

Options +FollowSymLinks

Code: Select all
RewriteEngine On

RewriteRule ^$ /index.html [QSA,L]

RewriteRule ^en/index\.php$ http://www.toranj-gem.com/en/ [R=301,L]

RewriteCond %{HTTP_HOST} !^www\.toranj-gem\.com$ [NC]
RewriteRule ^(.*)$ http://www.toranj-gem.com/$1 [R=301,L]


my domain dont redirect to index.html
and wen i want to visit internal pages of my cms on the root
it redirect to index.php

in the "en" i have problems like it too !

help me plz

i am return to back and start form the first now i have blank .htaccess files on the root and /en
torgheh
 
Posts: 16
Joined: Thu Oct 09, 2008 5:23 am

Postby torgheh » Fri Oct 10, 2008 12:46 am

I was start again!

----------------
just i have these problems :

i have these two adresses :

Code: Select all
www.toranj-gem.com

&
Code: Select all
www.toranj-gem.com/index.html


* i want redirect first one to second

------------------
my

Code: Select all
www.toranj-gem.com/index.php

&
Code: Select all
www.toranj-gem.com/XX.html


adresses fixed and worked correctly

-------------------

in the "en" sub_folder :

i have these 4 addresse :

Code: Select all
www.toranj-gem.com/en
toranj-gem.com/en
www.toranj-gem.com/en/index.php
toranj-gem.com/en/index.php


and i want to redirect all these addresses to

Code: Select all
www.toranj-gem.com/en/index.php


and i want work

Code: Select all
www.toranj-gem.com/en/XX.html


correctly

so can u help me plz and include here the right code?
torgheh
 
Posts: 16
Joined: Thu Oct 09, 2008 5:23 am

Postby richardk » Fri Oct 10, 2008 12:32 pm

Delete /en/.htaccess.

Try this in /.htaccess
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^$     http://www.toranj-gem.com/index.html   [QSA,L]
RewriteRule ^en/?$ http://www.toranj-gem.com/en/index.php [R=301,L]

RewriteCond %{HTTP_HOST} !^www\.toranj-gem\.com$ [NC]
RewriteRule .* http://www.toranj-gem.com%{REQUEST_URI} [R=301,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby torgheh » Fri Oct 10, 2008 1:00 pm

thank you for solved my all problems :D :D :D

except this one is not solved:

would you help me plz?

in the root i have these two addresses

www.toranj-gem.com
&
www.toranj-gem.com/index.html

i want redirect first address to second

another question :

if i decided to make a new sub folder named "gallery"
and install in that subfolder an image gallery and have just this address:

www.toranj-gem.com/gallery/index.php

is this code enough ?

Code: Select all
RewriteRule ^gallery/?$ http://www.toranj-gem.com/gallery/index.php [R=301,L]


thnx
torgheh
 
Posts: 16
Joined: Thu Oct 09, 2008 5:23 am

Postby richardk » Fri Oct 10, 2008 2:38 pm

The gallery rule should work.

Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^$          http://www.toranj-gem.com/index.html        [R=301,L]
RewriteRule ^en/?$      http://www.toranj-gem.com/en/index.php      [R=301,L]
RewriteRule ^gallery/?$ http://www.toranj-gem.com/gallery/index.php [R=301,L]

RewriteCond %{HTTP_HOST} !^www\.toranj-gem\.com$ [NC]
RewriteRule .* http://www.toranj-gem.com%{REQUEST_URI} [R=301,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby torgheh » Fri Oct 10, 2008 10:16 pm

thank you for your answer

richardk wrote:The gallery rule should work.

Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^$          http://www.toranj-gem.com/index.html        [R=301,L]
RewriteRule ^en/?$      http://www.toranj-gem.com/en/index.php      [R=301,L]
RewriteRule ^gallery/?$ http://www.toranj-gem.com/gallery/index.php [R=301,L]

RewriteCond %{HTTP_HOST} !^www\.toranj-gem\.com$ [NC]
RewriteRule .* http://www.toranj-gem.com%{REQUEST_URI} [R=301,L]


and what anout this one ?

thank you for solved my all problems :D :D :D

except this one is not solved:

would you help me plz?

in the root i have these two addresses

www.toranj-gem.com
&
www.toranj-gem.com/index.html

i want redirect first address to second
torgheh
 
Posts: 16
Joined: Thu Oct 09, 2008 5:23 am

Postby richardk » Sat Oct 11, 2008 8:47 am

That should be done by this rule
Code: Select all
RewriteRule ^$          http://www.toranj-gem.com/index.html        [R=301,L]

Do you not get redirected?

Try
Code: Select all
RewriteCond %{THE_REQUEST \ /(/?.*)?\  [NC]
RewriteRule .*          http://www.toranj-gem.com/index.html        [R=301,L]

instead of
Code: Select all
RewriteRule ^$          http://www.toranj-gem.com/index.html        [R=301,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby torgheh » Wed Oct 15, 2008 11:04 am

thank you
all problems solved
torgheh
 
Posts: 16
Joined: Thu Oct 09, 2008 5:23 am

..:: New Domain ::..

Postby torgheh » Sat Nov 01, 2008 11:40 pm

hi
here I have this new domain: “naimi.ir”

in the root I have an “index.html” file and I want to redirect all of these addresses
Code: Select all
www.naimi.ir
www.naimi.ir/index.html
naimi.ir/index.html
naimi.ir

to
Code: Select all
www.naimi.ir

in the root I have another “html” files like “art-gallery.html” , “design.html” etc

and for example I want to redirect these addresses :
Code: Select all
naimi.ir/art-gallery.html
www.naimi.ir/art-gallery.html

to
Code: Select all
www.naimi.ir/art-gallery.html

and another addresses like above example

would you please help me to have a right .htaccess file and redirect all addresses ?

i have a folder named “blog” and it I have installed a cms in this folder
the main page of this cms is “naimi.ir/blog/index.php” and it has another pages like
naimi.ir/blog/xxx or naimi.ir/categories/xxx/xxx

is this code in the root’s .htaccess file a correct code?
Code: Select all
RewriteRule ^blog/?$      http://www.naimi.ir/blog/index.php      [R=301,L]


or I need another code?

thanks a lot
torgheh
 
Posts: 16
Joined: Thu Oct 09, 2008 5:23 am

PreviousNext

Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 14 guests

cron