Canonical link seo friendly [closed] - .htaccess

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I have a link structure that is managed by an apache server. Some pages can be called with different url but with a php redirect the user will see just the canonical url for the page.
canonical url: www.example.it/490/persons/jan-antone-vian
generic url that call the same page: www.example.it/490/
My question is if it is correct to insert the url with just the id (www.example.it/490/) in some links (is much easier to manage the links) for SEO?

first of all, it's sure that a well constructed URL is better for SEO (url with keywords)
What you can do, and what you seems to have done :
keep the www.example.it/490/ URL for sharing,
add a 301 redirection to your
www.example.it/490/persons/jan-antone-vian when arriving in the first
url (www.example.it/490/). The SEO juice should be transfered to the
full url constructed.
Google says that ONE (and only one) URL has to be related to ONE (and only one) content, so you cannot let the both url displaying the same content. (you could be penalised for duplicate content...)
Note that a 301 is announced that it transfers the FULL SEO JUICE, but it's common to not do many 301 redirections in cascade.

Related

Google DynDNS with FritzBox [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 months ago.
Improve this question
I know thats not the kind of question that are commonly asked in here, but I don't know where to ask instead.
I want to setup DynDNS with my FritzBox 6600 Cable, but i always got an 500 - notfqdn (not full qualified domain name) Error. (I know FritzBox is not the best solution avaiable... but this is what i have to work with).
According to this guide i set up the DynDNS config in the FritzBox and used the username and password from the configured DynDNS and the update url domains.google.com/nic/update with the dyndns domain. The config in the FritzBox looks like the following:
Update-URL: domains.google.com/nic/update
Domainname (Domain-Name): something.my-domain.de
Benutzername (Username): my_username
Kennwort (Password): my_password
I don't know what's the problem. Some testing with other configuration shows that a random user and password give the same 500 error.
Do anybody know how the request of the FritzBox looks like and how the parameters are parsed?
According to the FRITZ!Box help page you can use pre-defined placeholders inside the Update URL which will be filled with the corresponding information.
So in the case of Google Domains the API expects a request URL in the following form:
https://username:password#domains.google.com/nic/update?hostname=subdomain.yourdomain.com&myip=1.2.3.4
In your FRITZ!Box DynDNS configuration you have to replace the variables in the Google Domains API URL by the corresponding placeholders from the FRITZ!Box documentation, which will look something like this:
https://<username>:<pass>#domains.google.com/nic/update?hostname=<domain>&myip=<ipaddr>
Note that the URL might be different depending on your FRITZ!Box type.
For further information check out the Google Domains help page Learn about Dynamic DNS
(especially the section "Use the API to update your Dynamic DNS record") and the help page of your FRITZ!Box, which may be accessed using the question mark icon in the top right of the DynDNS configuration page. (Help page for FRITZ!Box 7590)
You need to change the URL into following syntax
https://username:password#domains.google.com/nic/update?hostname=subdomain.yourdomain.com
Use the userdefined DynDNS provider.
Update-URL: https://domains.google.com/nic/update?hostname=mydyndns.yourdomain.com
Domainname: mydyndns.yourdomain.com
Username: generated username from Google Domains
Password: generated password from Google Domains

Redirecting an external link to a new website [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have a link on a page, for example http://123.456.789/~preview/websites.com and I need this to actually display and redirect to a new address, for example website.com
Can this be done using htaccess?
Yes.
I'm not sure what is the page and what is the link in your question, you're not being very clear. However, take this example:
I have a page /websites.html and on it I link to /websites/example.com which should be redirected to example.com:
RewriteRule ^websites/example.com http://example.com/ [R,L]
If you would want to redirect all urls in your /websites/ folder to their respective website:
RewriteRule ^websites/(.+)\.(.+)$ http://$1.$2/ [R,L]
(this would redirect /websites/test.com to http://test.com, /websites/www.del.icio.us to http://www.del.icio.us, etc)

IIS7.5: Is there a way to use Require SSL and URL Rewrite Module together for https? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
In IIS7.5, I have a URL Rewrite rule that redirects http requests to https. If I check "Require SSL", I get a 403 Unauthorized instead of a redirect, which makes sense.
Is there a way to use them together? Would there even be a benefit? I'm assuming no since every http request would be redirected, but I'm checking here in case I'm wrong.
Is this secure?
The 2 options work a very different way.
If you use the Require SSL option, every single page of your website has to be accessed by HTTPS and it means that (as you have seen it), if you forget the HTTPS and try to access with HTTP, you will have a 403 Unauthorized.
If you use the URL Rewrite Module, you can setup some pages or your whole website to be redirected to HTTPS (and some part back to HTTP if needed), and if a user forgets the HTTPS and hits the HTTP, he/she will be redirected to the HTTPS url.
As of having them to work together, there is a solution, but I don't really see the point:
[...] you will need to disable “Require SSL” checkbox for the web
site. If you do not want to do that, then you can create two web sites
in IIS – one with http binding and another with https binding – and
then add this rule to the web.config file of the site with http
binding.
http://blogs.iis.net/ruslany/archive/2009/04/08/10-url-rewriting-tips-and-tricks.aspx
(Section 4. Redirect to HTTPS)

Rewriting requests for a specific file to codeigniter [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have an application built with CodeIgniter that a 3rd party service (an email service provider) is making http requests containing POST data to when certain events occur. The problem is, the url that this 3rd party service is making the requests to is not fully modifiable by me, specifically, it make its requests to a file named w_4.php at the domain and directory that I specify.
Instead of having this separate file outside of the CodeIgnitier stack, I would like to, using .htaccess, rewrite all the requests made for this file to a controller within my codeigniter application, i.e. api/my_controller/my_method. But I need the POST data in the request intact, so I would think a redirect could not be used.
I tried something like this in my .htaccess:
RewriteCond $1 (w_4\.php)
RewriteRule ^(.*)$ index.php/api/my_controller/my_method
While the request does get routed to codeigniter, I just get a 404 even though that controller/route does exist.
The answer is to use the P proxy flag in the RewriteRule. As detailed here https://stackoverflow.com/a/359224/192694, the flag indicates that the request should be passed off to the proxy module intact, including its POST data.
For more info: http://httpd.apache.org/docs/2.2/rewrite/flags.html#flag_p

Domain showing without WWW [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
redirecting www.subdomain.example.com to subdomain.example.com
I have a hard time understanding DNS mapping and such.
Right now, whether I type in my URL with or without WWW, it loads the site, but the URL displays without the WWW. But I would like the WWW to be displayed.
Domain registrar is Hover and Host is Laughing Squid
What am I missing?
Thanks,
You didn't provide any details around the server configuration, etc., but you apparently have DNS entries registered for both - pointing to the same site, but have a rewrite rule in effect that is redirecting the "www" version to the non-"www" version.

Resources