Category : mod-rewrite

i have install ubuntu 16.04 server and i have lots of laravel project in /var/www/html with numeric folder like below 121744 content app bootstrap config database public resources routes storage tests vendor composer.json composer.lock server.php …. 12877 content app bootstrap config database public resources routes storage tests vendor composer.json composer.lock server.php …. 8798 content app ..

Read more

I have an Apache server running ISPConfig. On a domain example.com I am pointing its subdomains to subfolders, e.g. foo.example.com to /sub/foo. This works fine: RewriteEngine On RewriteCond %{REQUEST_URI} !^/example.com/ RewriteCond %{HTTP_HOST} !^www.example.com$ [NC] RewriteCond %{HTTP_HOST} ^([^.]+).example.com$ [NC] RewriteRule ^/(.*)$ /sub/%1/$1 [L] Now I need to point one specific subdomain into a subfolder’s subfolder (bar.example.com ..

Read more

I want to create subdomain from the first parameter of URL and then remove that parameter. Desired result: http://www.example.com/mystore -> http://www.mystore.example.com For this first I have created virtual host for mystore.example.com Now I am trying to remove this mystore parameter from url. I tried below changes in htaccess. Please check. RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} ..

Read more

I have an API developed using Laravel which I can access it with /api and a react website that uses this API. When I deploy both to my apache server under Ubuntu 18.04, the sites configuration is like following: <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/dashboard/build Alias /api /var/www/html/webapi/public ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined <Directory /var/www/html/dashboard/build> ..

Read more