Jump to content
Sign in to follow this  

Redirect folder catre subdomeniu cu .htaccess

Recommended Posts

Am un domeniu şi din cPanel am făcut un subdomeniu: test.site.ro şi am phpBB 3 instalat, însă subdomeniul merge şi pe www.site.ro/test - cum procedez să meargă doar pe test.site.ro?

Am încercat cu .htaccess folosind codul:

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^your_site.com$
RewriteRule ^(.*) http://www.your_site.com/$1 [QSA,L,R=301]

..dar nimic. Am încercat şi cPanel cu redirect, la fel, nimic. O altă soluţie?

Numai bine.

Battle Arena - https://forum.battlearena.ro




Share this post

Link to post
Share on other sites

Codurile cu care ai incercat fac altceva. Pentru a redirectiona www.site.ro/test catre test.site.ro foloseste:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^site.ro [NC]
RewriteRule ^(.*)$ http://www.site.ro$1 [L,R=301]
RedirectMatch 301 ^/test/(.*)$ http://test.site.ro/$1


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...