You are not logged in.
Hi there.
I'm setting up the script on my Debian 10 Nginx server and the option for search engin friendly urls in admin cp/options does not work on my NGINX server. Can someone share what code I need to put in my configuration file to correct this problem?
The default setting has urls with strings like https://domain-name.com/?e=8 which shows an individual cards. However, when I change to Search Engine Friendly Urls at Admin CP/options/ and change the Search Engine Friendly Urls to yes I get an error 404 at the new URL at https://domain-name.com/ecard/enjoy-your-honeymoon
Thanks.
Last edited by ceeohtwo (05-03-2021 13:48:48)
Firstly, no need to post here and email. Read the message at the top of the forum, thank you.
You'll need to make the modifications on your server to convert the following for nginx:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_msw_=$1 [L,QSA]
If you want to use rewrite rules ideally you should use Apache. I don't bother with Nginx, so maybe you can find some help on the Nginx forums?
Sorry I can't be more helpful.
I'm new around here so apologies for posting in both places and thanks for the .htaccess rewrite code. I was able to convert it to nginx using the following in my configuration file:
location ~ .*\.(ico|gif|jpg|jpeg|png|js|css) {
}
location / {
if (!-e $request_filename){
rewrite ^/([^?]*) /index.php?_msw_=$1;
}
}
However, one or two of the resulting search engine friendly urls downloads when you visit them instead of displaying the .php page. It's progress but I need to figure out the logic better.
Thanks again.
Last edited by ceeohtwo (06-03-2021 01:35:37)
No problem, glad you are making progress. I do use Nginx, but not if I need to use rewrite rules. I think there is a way of running Apache and Nginx together?
That code actually works. I just needed to clear my cache. I'm looking into running Apache and Nginx on the same server.
Thanks again.
No problem, glad you are making progress. I do use Nginx, but not if I need to use rewrite rules. I think there is a way of running Apache and Nginx together?
You're welcome.