I have this url:http://localhost:8080/skolski_portfolio/index.php?id=main&page=portfolio
and i want to be http://localhost:8080/skolski_portfolio/portfolio

then i make this rule in .htaccess
RewriteEngine On
RewriteRule ^([^/])/([^/]).html$ :8080/skolski_portfolio/index.php?id=$1&page=$2 [L]
i have error!

How to fix this?

The rewrite rule does not allow for rewriting to the port inclusive. It would be something along the lines of the below:
RewriteRule ^([^/])/([^/]).html$ /skolski_portfolio/index.php?id=$1&page=$2 [L]
Also note that if that fails you can also try the below

RewriteRule ^([^/]+)/([^/]+).html$ /skolski_portfolio/index.php?id=$1&page=$2 [L]

Just remember that if you need to redirect the user to another port then there is a special parameter you place before the rewrite rule which will redirect the user to another port which I suspect is not required under these circumstances.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.