rewrite .htaccess code work with subdomain -


creating short url script when use script subdomain[like http://s.yourdomain.com] .htaccess won't work script work fine @ other location yourdomain.com/sh/

here's code write .htaccess

rewriteengine on  rewritecond %{request_filename} !-d  rewritecond %{request_filename}\.php -f  rewriterule ^(.*)$ $1.php rewriterule ^([a-za-z0-9]+)$ index.php?short=$1 errordocument 404 /index.php 

want .htaccess code work on subdomain , above functions

rewriterule ^ http://s.yourdomain.com 

here wil pass sub domain name same when redirect url on mobile website. http://m.yourdomain.com


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -