![]() |
Mod rewrite on a subdomain with redirects
I have a subdomain, and I want to send uri's to the new subdomain using a redirect:
http://www.mydomain.com/subdomain/^anythinghere$ must go to : http://subdomain.mydomain.com/^anythinghere$ I also want mod rewrite: http://subdomain.mydomain.com/^anythinghere$/ must be rewritten as: http://subdomain.mydomain.com/index.php?q=^anythinghere$ How would I do this? |
In you main domain root directory a .htaccess files with
Code:
RewriteEngine ONCode:
RewriteEngine ONPs. remember to change subdomain in the first .htaccess file to your subdomain's name. |
Thanks, that's exactly what I was looking for. :thumbsup: I understand that [R] will send a redirect header to the browser, but what does [QSA] do? Oh yeah, using the index.html to index.php?q=index with the R flag would break the use of mod_rewrite, hahaha.
[edit:NVM.] Quote:
|
if you want http://subdomain.yourdomain.com/ to go to index.php?q=index you can use this:
Code:
RewriteEngine ON |
Another mod rewrite question. Can I "cloak" an url with mod_rewrite?
eg: http://www.encyshop to http://www.iceshop.nl/encyclue/store? |
| All times are GMT +1. The time now is 09:46 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.