browsersync with wamp external access

Browsersync seems great and I have it running well on my test machine and syncing across browsers. However, I can't get external devices (eg phone) to work with it.

I can connect to my localhost from my phone using my IP address (192.168.0.4) but I can't get it to connect to the port suggested by browsersync (192.168.0.4:3000) thus I don't get the live reload features. It returns a timeout error.

I'm using WAMP for my Apache/PHP and can't help but think it's a setting in Apache I've got wrong.

BrowserSync Settings:

browserSync: {
        dev: {
            bsFiles: {
                src : [
                    'js/main.min.js',
                    'css/style.css',
                    'images/**',
                    '*.php'
                ]
            },
            options: {
                watchTask: true,
                proxy: 'localhost:80',
                host: '192.168.0.4',
                //logLevel: 'debug'
            }
        }
    },

Apache Settings:

Options Indexes FollowSymLinks

AllowOverride All

 Order Deny,Allow
 Allow from 127.0.0.1
 Allow from localhost
 Allow from 192.168.0.4 # Local machine
 Allow from 192.168.0.3 # Samsung Galaxy S4

I have also tried on my work machine without success (although it too has similar settings).

Any thoughts on what I could try?

.htaccess non-www to www causing 404 link error

I changed my website from example.com to www.example.com in the .htaccess using this 301 redirect code below.

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

The homepage works fine now and redirects properly to the www version instead of the non www version of my site which is what I wanted. But now the links on my site do not work at all and I'm getting a 404 doesn't exist page. I'm using Wordpress. How can I fix this?

Edit: Never mind, I fixed it. I realized I accidentally deleted the part that was needed for WordPress to work properly and put in the www code in its place. Thank you.

How to rewrite theme path with difference in folder using htaccess

I'm having trouble with .htaccess config...

List files and folders content:

/
    src/
        css/
            admin/styles.css
            user/styles.css
        js/
            admin/init.js
            user/init.js

I want to access the file/folder path will matching paths rewrite

http://domain/src/css/staff/styles.css => src/css/admin/styles.css
http://domain/src/css/styles.css => src/css/user/styles.css

http://domain/src/js/staff/styles.js => src/js/admin/init.js
http://domain/src/js/styles.js => src/js/user/init.js

And here is my code:

RewriteRule ^src/staff/(.*)$ src/admin/$1 [L]
RewriteRule ^src/(.*)$ src/user/$1 [L]

But apparently things not working, there was an error has occurred "500 Internal Server Error".

If you just take a look at my problem and share a bit of your science, I'd be very grateful. Thanks!

Accidentally installed phpmyadmin as root user

While trying to install phpmyadmin, I accidentally installed it as a root user.

Beginning of the story, I was editing the httpd.conf file of Apache. To avoid permission issues while running some commands, i did sudo su - on the terminal. Thereafter without exiting from root user, I installed phpmyadmin using the following commands

cd /Library/WebServer/Documents/
tar -xvf ~/Downloads/phpMyAdmin-3.5.2.2-english.tar.gz
mv phpMyAdmin-3.5.2.2-english/ phpmyadmin
cd phpmyadmin
mv config.sample.inc.php config.inc.php

But now when I try to install yii at /Library/WebServer/Documents/, i get the following error

PHP Warning – yii\base\ErrorException

mkdir(): Permission denied

Is there any way I can remove the root user privilege from phpmyadmin without uninstalling?

Operating system: OS MAC Mavericks

.htaccess does not rewrite one URL

My .htaccess file looks like this:

RewriteRule   ^One/?$    /xxyy/xxyy111.php [NC]
RewriteRule   ^Two/?$    /xxyy/xxyy222.php [NC]
RewriteRule   ^Three/?$   /xxyy/xxyy333.php [NC]

One and Three display just fine in that the URL in the browser's address bar looks like this:

https://mywebsite/One

or

https://mywebsite/Three

but two is

https://mywebsite/xxyy/xxyy222.php

and I cannot figure out where to look for why this is happening.

Apparently it was a matter of signaling (my guess) Apache to update its rules. I made a change to .htaccess by pointing it to a non-existent file, then back to the original file and now it is working corectly.

Rewrite in .htaccess (URL with parameter)

At the moment I'm not really good in unterstanding how URL Rewrite in htaccess works (with regEex).

I want to have following Url:

example.org/lyrik/kategorien/allgemein-1/

It should go to following Url with the number at the at as parameter:

example.org/index.php?seite=kategorienDetail&kategorienId=1

I have tried different ways but they all dont work. The last I have tried was:

RewriteRule ^lyrik/kategorien/allgemein-([0-9]+)\$ index.php?seite=kategorienDetail&kategorienId=$1 [L}

This one made problems on the whole website. every page was inaccessible.

Can someone show me a Rewrite Rule that works in my case and explain the RegEx in it?

Failed to open stream on file_put_contents in PHP on CentOS 7

I know this is a common bug with many threads but I'm tired of searching and I still haven't solved it. When I try to run the function file_put_contents I get the following error:

Warning: file_put_contents(test.txt): failed to open stream: Permission denied in /var/www/html/nurses/adminWriter.php on line 29

I've already done the most common answer, change the permissions of the nurses folder and the test.txt file to 777. That didn't work.

I'm currently on a fresh install of the latest CentOS 7 server.

I've found that if I run the php script through the console:

# php /var/www/html/nurses/adminWriter.php

It works just fine, I get the error only when running it through the browser, but I really need to run it this way.

Best Regards!