Hot answers tagged clean-urls
9
The first one is preferred. This is because it is interpreted as document, whereas the second one is interpreted as document up to product, and as query arguments later on. So search-engine wise, there is no difference between
http://www.example.com/product?123/subpage/456
and
http://www.example.com/product?p1=123&p3=456&p2=subpage
it is only ...
9
According to Kurt himself, it was basically just cuz.
And I'd personally question whether search engines consider URLs' file extensions as "words" for search purposes, though I'm not sure I've run across definitive evidence either way on that.
5
You need to add the following line into your .htaccess file(s):
Options +MultiViews
The effect of MultiViews is as
follows: if the server receives a
request for /some/dir/foo, if
/some/dir has MultiViews enabled,
and /some/dir/foo does not exist,
then the server reads the directory
looking for files named foo.*, and
effectively fakes up a ...
5
Slightly off-topic but I try anyhow:
When I encounter URLs like http://www.example.com/product/123/subpage/456.html I always think that this is an attempt on creating meaningful hierarchical URLs which, however, is not entirely hierarchical. What I mean is, you should be able to slice off one level at a time. In the above, the URL has two violations on this ...
4
Setting up a URL shortener isn't really that hard if it is for your use only. In order to integrate with with Twitter and WordPress you will have to develop you own API and plugins and that is the difficult or at least time consuming part. I think the basic steps would be.
Buy a short URL and get hosting for it.
Create a redirection engine in the ...
3
See Webmaster Tools: Updates to Search queries, Parameter handling and Messages at the Google Webmaster Central blog for instructions to suppress the PHPSESSID parameter in search results.
On the server-side, you should look into a way to prevent every hit from creating a session - session management is expensive server-side and it is generally undesirable ...
3
It looks like your current URL paths are of the form /category/redundant-descriptive-title/id, where only the category and id parts are actually needed to identify the content. (For example, I can link to http://www.soundplaza.co.uk/speakers/blah-blah-who-reads-this-anyway/10 and see the exact same content as on the page you linked in your question.)
I ...
2
One more thing to think about is something like bit.ly Pro. You can have your own domain, but with all the speed and analytics from bit.ly.
I know that it's still relying on someone else's service, but bit.ly is probably the biggest provider on the web so if they went down, a hell of a lot of people's links would break
2
Page depth has less to do with site hierarchy, and more to do with how many clicks it takes the user to get to their desired destination. If it takes 1 click to go from yoursite.com to yoursite.com/this/that/everything/else/ then technically that's only 1 page deep.
I wouldn't tinker with the small stuff like this, as it will likely return little if any ...
1
Having short clean URLs can help a very small amount with SEO. That is because users tend to click on them more when they are displayed in the SERPs. The more complicated the URL the fewer people click. The magnitude of this effect is small enough that it isn't worth worrying about if there is a technical reason that your URLs need to end like that.
Your ...
1
Try this in your root's .htaccess:
RewriteEngine on
RewriteRule ^[^/]+/(\d+)$ records.php?id=$1 [QSA]
http://example.com/foo-bar/42 will be rewritten to http://example.com/records.php?id=42
It wont affect URLs like contact.php, since it does not match ^[^/]+/(\d+)$
1
Try adding CHttpSession::setUseTransparentSessionID(true) (api) somewhere in your Yii app, if it doesn't already exist.
I don't like visible session IDs either (triggers the flashbacks of PHP3 vs. broken IE cookies), so I always set it. I'm not 100% sure it'll fix the issue, but I haven't seen any session IDs sneak into search results for the few Yii apps ...
1
I usually use http://www.example.com/product/123/subpage/456. In my case, I've been better off using this kind of URL rather than URLs with parameters. It's your decision tough...
Also, using htaccess (if you're using Apache) you can get the rewriting of the pages quite easily.
Only top voted, non community-wiki answers of a minimum length are eligible
