Seo Urls
Posted: Tue Jun 17, 2014 2:33 pm
Hi
I'm trying to makes urls much seo compliant.
I need to remove extensions like .html and .php.
I've tried a lot of thinks but nothing works.
For first i need to be sure that the file to be modified is xxx.xxx.xxx.xxx.conf on /etc/nginx/conf.d
Then i saw online that i must add something like this try_files $uri.html $uri $uri/ /index.html;
So my file will be
server {
listen xxx.xxx.xxx.xxx:80 default;
server_name _;
#access_log /var/log/nginx/xxx.xxx.xxx.xxx.log main;
location / {
proxy_pass http://xxx.xxx.xxx.xxx:8080;
try_files $uri.html $uri $uri/ /index.html;
}
}
I restart nginx but nothing happen.
Any idea?
I'm trying to makes urls much seo compliant.
I need to remove extensions like .html and .php.
I've tried a lot of thinks but nothing works.
For first i need to be sure that the file to be modified is xxx.xxx.xxx.xxx.conf on /etc/nginx/conf.d
Then i saw online that i must add something like this try_files $uri.html $uri $uri/ /index.html;
So my file will be
server {
listen xxx.xxx.xxx.xxx:80 default;
server_name _;
#access_log /var/log/nginx/xxx.xxx.xxx.xxx.log main;
location / {
proxy_pass http://xxx.xxx.xxx.xxx:8080;
try_files $uri.html $uri $uri/ /index.html;
}
}
I restart nginx but nothing happen.
Any idea?