N
N
Nikita Kolosov2013-09-10 15:49:07
Apache HTTP Server
Nikita Kolosov, 2013-09-10 15:49:07

.htaccess content for dynamic subdomain

In general, on the local machine there is a develop/
domain Inside lies CakePHP. The site is working, everything is ok. It was necessary to make dynamic subdomains (http://username.develop === develop/user/username )

ServerAlias ​​*.develop

.htaccess is registered in the apache settings in the develop root:

<IfModule mod_rewrite.c>
  RewriteEngine on

  RewriteCond %{HTTP_HOST} ^(.+)\.develop/ [NC]
  RewriteRule (.+) http://develop/user/%1 [L,QSA]

  RewriteRule    ^$ app/webroot/    [L]
  RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>


RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L]- not my lines.

Bottom line - rewrite does not work. Chrome issues
The webpage at username.develop/ might be temporarily down or it may have moved permanently to a new web address.
Error code: ERR_NAME_RESOLUTION_FAILED


Question: What did I do wrong and how can I fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Vasilchuk, 2013-09-10
@Anonym

Are you sure username.develop resolves to 127.0.0.1?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question