ahadsalim Posted December 6, 2006 Share Posted December 6, 2006 HelloI have a website like weblog that user can register and write their Post and publish them !but i have some problem to rewrite url !i want when user type : something.mysite.comredirect to mysite.com/blogindex.php?u=somethingI install wild card and it redirect all addresses & i use this in .htaccess[code]RewriteEngine On# Extract the subdomain part of domain.comRewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com$ [NC]# Check that the subdomain part is not www and ftp and mailRewriteCond %1 !^(www|ftp|mail)$ [NC]# Redirect all requests to a php script passing as argument the subdomainRewriteRule ^.*$ http://www.domain.com/blogindex.php?u=%1 [R,L][/code]but when i type the URL ,redirected in address bar too, i want users don't underestand this !and the next is ,when i type somthing.mysite.com/archive.php?70 i want redirect to mysite.com/blogarcive.php?u=something&postid=70 Link to comment https://forums.phpfreaks.com/topic/29675-mod-rewrite-create-subdomain/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.