Status
Not open for further replies.

wheres me jumpa

New Member
I am trying to redirect from a subdomain to a file using .htaccess. Its working but I dont want the redirect visible, i.e. I want the sub domain to remain as the url. i.e.:

User types casino.waffle.ie
Redirected to waffle.ie/casino.php
casino.waffle.ie remains in URL

Any help appreciated.

Heres the code that is currently visibly redirecting:

Code:
RewriteCond %{HTTP_HOST} ^casino.waffle.ie$ [OR]
RewriteCond %{HTTP_HOST} ^www.casino.waffle.ie$
RewriteRule ^(.*)$ http://www.waffle.ie/casino.php [R=301,L]
 

daviddoran

New Member
I think the R=301 is doing it because you are telling the browser/search-engine-spider that you've moved to /casino.php so clearly it needs to know the URL. I've always used either [L] or no flag at all.
 

louie

New Member
try creating the folder "casino" and add your content in there than use .htaccess to redirect to the right file.
 

wheres me jumpa

New Member
Its an awkward one because, ive created the casino subdomain, which creates a casino folder. However the casino plugin files are already located in a folder called casino.

Ive tried creating an Index file in this casino folder but Im getting errors in loading include files because the location is now changed.

So, I thought rather than work through the errors a redirect as above would do just the same.
 

louie

New Member
without knowing exactly how you do things is very hard to help so we are only trying to suggest things that might or might-not work.
I am using subfolders myself and haven't had any problems like yours.
Is the .htaccess file in this "casino" folder that you are talking about or in the root of the website?
 
Status
Not open for further replies.
Top