how to dynamically rewrite the url? - apache

original url
http://wwww.mydomain.com/image.php?id=13&cat=4&type=3$date=2011-03-14
i want to modify this dynamic url to something like this
http://www.mydomain.com/imageid/imagetitle (no php/html extension at the end )
plz if someone could help me in this , i have tried several online generators but my modification is little different.
I don't know how to write mods .

well, to get it you could need a page that redirects you to another location.
in the head section of your html page you have to specify a meta tag like it:
<meta http-equiv="refresh" content="0; http://www.mydomain.com/imageid/imagetitle" />
when you land on that page, it counts to seconds you specified in the first argument of content (in this case 0 seconds) and opens the new page passed as the second parameter.
a easy thing you could do to avoid extensions to be visible on the address bar of your browser is to create a folder in your web server (in your case "imagetitle") and put inside it an index page for example "index.html" which is the page loaded by default when a user aims to that link

Related

Making Durandal SPA site SEO friendly

I'm trying to make a Single page application crawlable, and has successfully created HTML snapshots on demand, but I'm having difficulty understanding if "#" fragments is considered "pretty URL", or if it's just "#!"?
I've read http://durandaljs.com/documentation/Making-Durandal-Apps-SEO-Crawlable.html and https://developers.google.com/webmasters/ajax-crawling/docs/specification
It seems to me that only "#!" is a pretty URL and that Durandal does not support this. It supports pushState, though. According to the last link, this should not be included if the page already are using pretty URLs:
<meta name="fragment" content="!">
One effect being that the indexed version of the page "www.domain.com?_escaped_fragment_=#" will be "www.domain.com#", and we want the URL without the hashbang to be indexed of course.
So to wrap it up - I will use # fragments, and not #!, should I include the meta fragment or not - and our internal links will also have # fragments, and not #!, will they be followed by Google?
Thanks for input!
Sitenote
According to the first link you could actually change the fragment to "#!" instead of just "#", but I cannot get it to work. I tried overloading the convertRouteToHash() function, it goes in, and I don't see a change no matter what the function returns.
Nowdays URL fragments are obsolete: https://developers.google.com/webmasters/ajax-crawling/docs/specification
I now use pushState instead and all pages are indexed just fine.

Edit header in Typo3

I have a website that is running on Typo3 CMS, this was all setup by our developer, problem is he doesn't work for us anymore, all I want to do is change the url of our company logo located at the header section, I have basic knowledge of HTML and CSS, I manage to move things around in the backend, but I don't know how to change the url of our logo.
It's possible that your developer has set it in:
Typoscript (e.g. PAGE TS)
template-File (index.html in /filedmin or fileadmin/templates)
As Content Element (at the top of the Tree)
CSS
A Mix of all of the Possibilities...
Perhaps a solution:
Type the current url of the Image in the Searchbox at Top of Backend.
Another Way to find out is via Firebug (Firefox).

Page not displayed on my website

I'm trying to put together my website but I'm experiencing a very weird behaviour. I have an html resource named y6.html in my www directory in the root directory of the website. It worked very fined until yesterday when suddenly when accessing it it sends me a void webpage with an empty head and an empty body (not a 404).
Also I realized after one point that I would change the css on the website but that the changes I made would be on the ftp server at the right place but the website would still display the old version I had not modified even after emptying the cache.
The page is : http://www.dronecontrast.com/y6.html
Any clue on what's causing this?
Thanks
This is an HTML error. Your <title> is not closed as usual. You must use </title> to close it.
</title> is missing. Add the slash and try again
Just looking through the page source of that web page, you have made an error with the title tag. On your closing tag you have missed your "/". Put that in and see if it works
Your HTML markup is wrong. Please check nesting of title,head and body inside your html tag. Please consider using a text editor like Notepad++ / Sublime Text and check whether the tags are closed and nested properly.
In your markup Title tag should be closed.

open webpage (or snapshot of webpage) into another webpage though vb.net

i have an aspx page with vb.net back end. in that page i get names and url's from the database depending on different conditions. My requirement is that when i get the url, the code should then use that url and have that webpage in a small preview form on my existing aspx page.
so basically i have a table as follows -
Name URL Preview-URL
Sandy www.myspace.com/sandy -- should be the url webpage in specified height and width.
Mandy www.myspace.com/mandy -- should be the url webpage in specified height and width.
does anyone know how i can achieve this?
You can create small url previews by using the iFrame tag. Let's say you have an asp:PlaceHolder control called "iframePlaceholder" in your aspx. In your code behind you could do something like:
Dim iframeControl As New LiteralControl("<iframe src=""www.myspace.com/mandy"" width=""100px"" height=""300px"">")
iframePlaceholder.Controls.Add(iframeControl)

Problem with internal anchors and links

I've set up a brochure ware kind of site - with links to different sections in the page.
http://www.leoniepalmer.com/
When clicking a menu item in the top right corner, everything works great!
Now I have a second page at
http://www.leoniepalmer.com/our-gourmet-tours/
And I want the menu to then go back home to the relevant anchor, that is, clicking About will go to
http://www.leoniepalmer.com/#about
Unfortunately (in FF 3.5.6 at least), it seems to append it to the URL and it becomes quite ugly, as well as not going to where it should!
Could it be this rule in my .htaccess, that appends a trailing slash to pages without one?
# Add trailing slash if missing
rewriteRule ^(([a-z0-9\-]+/)*[a-z0-9\-]+)$ $1/ [NC,R=301,L]
How could I modify it to work, or is there something else at play here?
UPDATE
I don't think the answer is helpful at all.
You can link to an Id using the #anchor fragment.
OK, I'm guessing it's because you're using a <div> tag as the target of a link.
Properly, named tags that are the target of links to a location in a page are also <a> tags, your syntax is similar to
<a name="about">About Leonie and Stef Palmer</a>
Here's the source:
source
This creates an anchor around the text "This is the location of anchor one.". Usually, the contents of A are not rendered in any special way when A defines an anchor only.
Having defined the anchor, we may link to it from the same or another document. URIs that designate anchors contain a "#" character followed by the anchor name (the fragment identifier). Here are some examples of such URIs:
An absolute URI: http://www.mycompany.com/one.html#anchor-one
A relative URI: ./one.html#anchor-one or one.html#anchor-one
When the link is defined in the same document: #anchor-one
Just to be safe, you might want to make the link in your navbar to the full document:
About
Not only is this one of the use cases described above, it saves Apache some work. Including the full path lets the browser go straight to the page, whereas not including the name of the document means the browser has to ask Apache on your server what the name of the page is and then go there - 2 connections for the price of 1