The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

Reply to this topicStart new topic
> Redirect with .htaccess, hiding the real URL
post Sep 21 2014, 06:37 PM
Post #1

Group: Members
Posts: 1
Joined: 21-September 14
Member No.: 21,579


I'm stuck on a .htaccess problem and I deeply need your help! I hope I'll be able to explain my problem clearly, but I'm french, so it doesn't help... rolleyes.gif

I have a domain,, that I'd like being redirected to but I'd like the URL that appears in the address bar being "" instead of the ""

After searches on Google, I made my .htaccess looking like this:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?mydomain2\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/folder_site2
RewriteRule ^(.*)$ /folder_site2/$1 [L]

I first thought it was working fine, as, when I typed "", I was correctly redirected on "" with "" as visible URL.
But it seems it's impossible to reach a sub-folder. Any URL like "" would reach to a 404 (while it was possible to reach via "")

What have I done wrong? huh.gif

Thanks a lot for any help you could bring!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


- Lo-Fi Version Time is now: 20th October 2019 - 10:01 AM