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 ...
| |||||||
| Register | Forum Rules | FAQ | Donate | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||||
| 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. |
| ||||
| I tried with/without the L/301 and no joy. |
| |||||
| 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 |
| ||||
| 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. |
| |||||
| 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? |
| Tags |
| htaccess, redirect |
| Thread Tools | |
| Display Modes | |
|
|
| ||||
| 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 |
| ||||||||
| | ![]() | |||||||