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 10 years ago.
Improve this question
Is it possible to hide parts of the link using .htaccess rewrite rule?
I'm working on hotlink protection. The playlist is generated with the following link: http://site.com/get.playlist.php?
the full link:
http://site.com/get.playlist.php?playlist=http://site.com/video/34141ce7760f58f0c3eb5e0c758afb69/pl/playlist.txt&hash=34141ce7760f58f0c3eb5e0c758afb69
i would like to display the link without &hash= and http://site.com/get.playlist.php?playlist=
like this:
http://site.com/video/34141ce7760f58f0c3eb5e0c758afb69/pl/playlist.txt
Unfortunately, this is not possible (at least, not in any rational manner) using .htaccess.
There's no way to change the URL that the browser is displaying- however, you could do the opposite- .htaccess does have the power to keep the URL the same, but display a different page on the server.
This would be a bit harder to setup (especially because of the hash parameter), but may be something for you to consider.
Related
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 8 years ago.
Improve this question
On our website, we use page names with GET attributes for URL's, for example "page.php?index=43". We want to use rewrite rules in the htaccess file so that we can type "/pages/some-page-title" for the same effect. However, we also want to keep our Google rankings from the previous URL's. Is there a way we can achieve that?
If you make a proper redirect, with a 301 return code from the old urls to the new urls, the ranking should not be affected.
https://support.google.com/webmasters/answer/83105?hl=en
However, this is every SEO'ers nightmare, because what if... :) I think you just have to trust Google's promise that ranking will be kept when you create proper, working redirects.
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
The question is pretty straight forward. I've seen some questions similar but not what I need an answer to. So lets say I splice the entire site and use includes for almost everything. Navigation, about us, etc,. Will this effect google ranking and indexing? Will google view the site by parsing the php when it passes an include or will it index it as a blank site. As most all of it will be inside separate includes files. Thanks
No. Google should not be able to see your php script.
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 10 years ago.
Improve this question
My app is built in a fashion similar to Facebook in that it uses a form of pagelets which are generated asynchronously and then sent to the page and injected via javascipt.
This means that I have to set to pages title via javascript also. My small understanding of SEO lads me to believe that the tag is extremely important and defines not only what google displays as the title in search results but it will also play a huge part in defining your rankings.
Therefore, my question is:
Does google read, process and taking into account dynamically inserted title tags?
Thanks
It does, if you use the hashbang (#!) to show that it's scrape-able AND you generate the data for Googl to scrape properly, such as with a headless browser, see more:
https://developers.google.com/webmasters/ajax-crawling/
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Simple question:
I'm trying to maintain a list of 301 redirects for SEO reasons and I want to know if its better to be using .htaccess with redirect rules or should I maintain the list of redirects in PHP.
If you could explain why either one is better that would be great!
Keeping your redirects in .htaccess will be better for performance, as there will be no PHP interpreter initialization required for each redirection. On the other hand, you can do additional processing if you do it in PHP (stats counting, etc). If you want simple redirects and nothing else, place them in .htaccess just for the performance advantage.
For SEO purposes neither makes a difference as both results in the same thing; A Location change. Both are handled by the server and have the same impact on a Search Engine. So, based on that, go for whichever is the most efficient for you to handle.
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 am using a post as my home page (WordPress site) by making it a sticky post. I prefer to do it this way versus assigning a page as sticky since posts have more options than pages.
The problem I have that I am looking for a solution to, is that the post is indexed as both example.com and example.com/post-name.
Both these pages point to the same content and I would like to ask for suggestions on a PHP script that does a "search engine friendly" redirect on requests for example.com/post-name so that the post does not get indexed as duplicate content.
PS: a 301 redirect is likely the best solution but I am looking for a solution I can implement in script as well.
Yes, you could do this with php or with htaccess. For PHP solution, see http://php.net/manual/en/function.header.php and http://us.php.net/manual/en/reserved.variables.server.php - I think you want to check $_SERVER['REQUEST_URI']