Relative Content

Tag Archive for apache.htaccessmod-rewrite

Rewrite nginx to htaccess

In a nutshell, I have this working nginx rewrite rule:
rewrite ^/stire-(.*)$ /stire.php?url=https://$1;
and I’m trying to port it to Apache. I’ve tried lots of RewriteRule combinations in the htaccess file, none of them worked. Any ideas please?
The purpose is to change stire.php?url=https://whateverelse into stire-whateverelse.

Apache rewrite engine not working as expected

I’m seeking help with configuring the Apache rewrite engine as I’m relatively new to working with it. My goal is to remove the PHP extension from URLs when a file is accessed in the browser, and also to ensure that URLs have a trailing slash if it’s missing. Unfortunately, I’m encountering difficulties with the current configuration because it does not remove the PHP extension, but I am able to access the files without the extension.