Forum Moderators: phranque
1. What rewrite rule I have to use exactly? (Apache server)
2. For how long rewrites have to stay on htaccess?
3. How long will take search engines to update new pages?
4. What would happen with site rankings?
5. Should I change file extensions from .htm to .html, too?
If it's OldFolder to new-folder those are entirely different URLs with no way to automate it.
If you simply like "html" better, then you might as well use it in the new URLs since you're changing anyway. But otherwise leave things as they are.
4. What would happen with site rankings?
1. What rewrite rule I have to use exactly? (Apache server)If it's OldFolder to new-folder those are entirely different URLs with no way to automate it.
FYP: If it's OldFolder to new-folder those are entirely different URLs with no way to automate it in the .htaccess, but you could use PHP ;)
2. For how long rewrites have to stay on htaccess?
3. How long will take search engines to update new pages?
4. What would happen with site rankings?
5. Should I change file extensions from .htm to .html, too?If you simply like "html" better, then you might as well use it in the new URLs since you're changing anyway. But otherwise leave things as they are.
Or strip the stinking extension so it's not necessary to redirect in the future if the underlying technology creating the site changes -- The extension of a URL should have no impact at all on rankings.
Why make it obvious to the robots that there's more than meets the eye?
actually it's possible to automate this with mod_rewrite
If it's OldFolder to new-folder those are entirely different URLs with no way to automate it. Unless you have a lot of names in the form "blahblahfolder" with a recurring element; then there might be a pattern.
Show us what you've got and we'll help you with details. The big question is just how many pages are involved, and how many permutations of basic patterns such as lowline vs. hyphen. This will determine whether it's better to keep it all in htaccess, or to rewrite everything to a php page that does the lookups and transformations and then issues a 301 of its own.
What would be better for SERP - changing just folder upper to lower case or changing the page name too?
What does Accept-Ranges mean?
It means the client can request only a portion of a document rather than the whole document -- EG a single page of a PDF rather than the entire PDF file.
Interesting about some of the headers there -- I haven't seen some of them on any of the hosts I've used unless they're set manually in the PHP file -- Namely, expires + content-length, and sometimes cache-control. The content length being there is likely because the gzip is running after the PHP has generated the content and generates a content-length header.
Host: www.example.com
User-Agent: {Firefox on my mac}
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: iu,en-us;q=0.8,en;q=0.6,no;q=0.4,de-de;q=0.2 {these are my OS settings, not specific to the browser}
Accept-Encoding: gzip, deflate
Cookie: {piwik cookie here}
Connection: keep-alive
Also, are you running a php.ini with expose PHP turned off to get rid of the X-Powered-By purposely?
What does Accept-Ranges mean?
14.5 Accept-Ranges
The Accept-Ranges response-header field allows the server to indicate its acceptance of range requests for a resource:
Accept-Ranges = "Accept-Ranges" ":" acceptable-ranges
acceptable-ranges = 1#range-unit | "none"
Origin servers that accept byte-range requests MAY send
Accept-Ranges: bytes
but are not required to do so. Clients MAY generate byte-range requests without having received this header for the resource involved. Range units are defined in section 3.12.
Servers that do not accept any kind of range request for a resource MAY send
Accept-Ranges: none
to advise the client not to attempt a range request.
Is it the same changing url (path to page) and page name for SEO?
What would be better for SERP - changing just folder upper to lower case or changing the page name too?
Namely, expires + content-length, and sometimes cache-control.
This module controls the setting of the Expires HTTP header and the max-age directive of the Cache-Control HTTP header in server responses.
When I type: www.domain.com/folder/page.htm I got the page but it changes to www.domain.com/Folder/page.htm
Since I do not need to test luck with Google and change filenames – lets do only folder change from upper to lowercase letter.
i believe the Content_Length header is typically sent by default when apache serves a static file, although this behavior can be disabled.
mod_speling would return either a 404 or a 30X.
[If] only one document is found that "almost" matches the request, then it is returned in the form of a redirection response.
On your non-www to www redirect in htaccess exclude upper case and underscore requests from being redirected by using a preceding RewriteCond.
Find out what's going on and report back.
[edited by: phranque at 4:48 pm (utc) on Dec 17, 2013]
[edit reason] Please Use example.com [webmasterworld.com] [/edit]
Once I typed /ToolService/ url in browser – server changed /ToolService/ to /toolservice/ in browser bar and I got physical directory /toolservice/ and page with no problems.
Will search engines handle correctly site inbound links with uppercase directories – once I just rename 5 other physical directories to lowercase letters – and do nothing in .htaccess?
Once I typed /ToolService/ url in browser – server changed /ToolService/ to /toolservice/ in browser bar and I got physical directory /toolservice/ and page with no problems.
Will search engines handle correctly site inbound links with uppercase directories – once I just rename 5 other physical directories to lowercase letters – and do nothing in .htaccess?
what status code did you get for that redirect?
I didn't get any status code. Just normal page.
CheckSpelling Off CheckCaseOnly on Use the HTTP Live Headers extension for Firefox to examine the HTTP status code returned in the redirect.
HTTP/1.1 200 OK
Date: Tue, 17 Dec 2013 23:23:20 GMT
Server: Apache
X-Powered-By: PHP/5.4.23
Keep-Alive: timeout=2, max=199
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
this response is "stock-standard" for an HTML extension rewritten to PHP:
The quoted response is identical to what Live Headers gives me when I try the same request in MAMP. (Right down to php version: You didn't get it from your own MAMP did you?) That's for any request, whether html physical file or html rewritten to php.
But I have the same lines in my local file's htaccess, and the headers are absent.