Irish SEO,  Marketing & Webmaster Discussion

 

.htaccess redirect

This is a discussion on .htaccess redirect within the Coding Help forums, part of the Webmaster Help category; I am trying to redirect from a subdomain to a file using .htaccess. Its working but I dont want the ...


Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Coding Help

Register Forum Rules FAQDonate Members List Calendar Search Today's Posts Mark Forums Read


Notices

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 22-03-2008, 05:40 PM
Wannabe Geek
 
Join Date: Nov 2006
Location: Carlow
Posts: 117
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
wheres me jumpa will become famous soon enough
Send a message via AIM to wheres me jumpa Send a message via MSN to wheres me jumpa
Default .htaccess redirect

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]
__________________
“When you want something, all the world conspires in helping you to achieve it.”

www.waffle.ie

waffle.ie/members/wheres me jumpa

Waffle Arcade
Waffle Casino
Waffle Radio
Waffle TV

NSFW.ie

wheresmejumpa.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 22-03-2008, 06:13 PM
daviddoran's Avatar
Wannabe Geek
Recent Blog: iMSISS
 
Join Date: Aug 2006
Location: Meath, Ireland
Posts: 342
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
daviddoran will become famous soon enough
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 24-03-2008, 02:40 PM
Wannabe Geek
 
Join Date: Nov 2006
Location: Carlow
Posts: 117
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
wheres me jumpa will become famous soon enough
Send a message via AIM to wheres me jumpa Send a message via MSN to wheres me jumpa
Default

I tried with/without the L/301 and no joy.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 24-03-2008, 03:17 PM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 2,048
Nominated 5 Times in 3 Posts
Nominated TOTW/F/M Award(s): 1
louie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enough
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

try creating the folder "casino" and add your content in there than use .htaccess to redirect to the right file.
__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Directory Submission Directory Submission
:. News & Press Release Ireland GiveItSocks.com
:. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories
:. I Have 2 Find It Directory SEF Directory
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 24-03-2008, 03:33 PM
Wannabe Geek
 
Join Date: Nov 2006
Location: Carlow
Posts: 117
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
wheres me jumpa will become famous soon enough
Send a message via AIM to wheres me jumpa Send a message via MSN to wheres me jumpa
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 24-03-2008, 05:35 PM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 2,048
Nominated 5 Times in 3 Posts
Nominated TOTW/F/M Award(s): 1
louie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enough
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
htaccess, redirect

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
301 redirect issue lostie Webmaster Discussion 2 17-07-2007 12:33 PM
To Redirect or not to redirect? lostie Webmaster Discussion 21 24-05-2007 09:35 PM
Wordpress .htaccess file for no-www and mod-rewrite() Cormac Blogs & Blogging 9 20-03-2007 09:31 AM
Delete Or Redirect Files From Server? Peter McC Webmaster Discussion 4 14-02-2007 01:32 PM
.htaccess query Cormac Server / Technical Administration Tips and Queries 4 20-10-2006 09:54 AM


Sponsored links

Paid On Results


All times are GMT +1. The time now is 01:14 PM.


Powered by: vBulletin Version 3.7.3, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Hosted in Ireland by Blacknight - Test your ISP |Irish Hosting Directory| Armchair.ie|Logo by Eden Web Design|Avatars by Afterglow |Latest Blog Entries | VPS HostingAd Management by RedTyger

Search Engine Friendly URLs by vBSEO 3.2.0