loading
Please wait while loading...

Read more Mod Rewrite not working in wamp

If you found your rewrite module not working well even mod rewrite is enabled, try to do the following change:

Search AllowOverride None from httpd.conf and replace it by AllowOverride All.

Restart your service and check your page again, the rewrite rule should be working now.

Read more Rewrite a subdomain to a sub directory

Share a rewrite format that you can rewrite a sub domain to a sub directory ( not redirect ):

For example:
http://hello.cambyliverson.com
You will see the content of /hello
Which the url keep showing as http://hello.cambyliverson.com
Below is the code

RewriteCond %{HTTP_HOST}   ^[www\\.]*sub-domain-name.domain-name.com [NC]
RewriteCond %{REQUEST_URI} !^/sub-domain-directory/.*
RewriteRule   ^(.*)  /sub-domain-directory/$1  [L]