Hi!
I have a problem with rewrite mode on my local web-server (apache2) after ubuntu upgrade and now I have not access to my projects. Localhost and virtual host works fine, I can go to http://localhost myproject and to http://myhost.home.
I have edited my apache vhost file in /etc/apache2/sites-enabled to add the following:
<VirtualHost *:80>
ServerName www.mysite.cn
ServerAlias mysite.cn *.mysite.cn
DocumentRoot /home/user/static/mysite/cn
</VirtualHost>
It still points to the default site on the server when i browse to mysite.cn but when i enter anything along the lines of ww3.mysite.cn it point to the new correct
the error says:
Virtualhost mysite.com has no server environment set, request will not be honoured
my vhost file is:
<VirtualHost *:80>
ServerName mysite.com
ServerAdmin web@mysite.com
DocumentRoot "/srv/d_servpa1/www/mysite.com/htdocs"
<Directory "/srv/d_servpa1/www/mysite.com/htdocs">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
I want to offer custom subdomains for my customers.
I am new to using regular expressions for rewriting URL's in htaccess
I need to redirect mysite.com/123 to mysite.com/, IF cookie named 'ref' is set.
my current htaccess is:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_COOKIE} ref=true [NC]
RewriteRule ^/([0-9]+)/$ http://www.mysite.com
</IfModule>
The goal is that when someone enters site with: mysit
Thought I would see if anyone can help with this apache2 set up running on ubuntu server 12.04.
I have set up my virtualhost files as:
<virtualHost *:80>
ServerAdmin webmaster@mysite.com
ServerName www.mysite.com
ServerAlias mysite.com
DocumentRoot /var/www/myfiles
</VirtualHost>
I have tried to reverse the Name and Alias but cannot connect using www.
I've set up a few virtual hosts in Lion and it's running very slowly.
I've tried to find a solution to this and found some guides out there but none seem to work.
I have the following URL - http://www.mysite.com/aboutus.html
However there are some other sites which link to my old hosted site and point to http://www.mysite.com/nw/aboutus.html.
I have two copies of a folder in separate locations. They contain the exact same .htaccess file. Both .htaccess files have the same permissions and owners.
/home/sites/site/public_html/
/var/www/html/site/
I had a VirtualHost whose DocumentRoot used to point to /home/sites but I changed it to /var/www and restarted Apache.
Now my htaccess rules no longer work.