Jump to content
xisto Community
MiniK

No File Extension

Recommended Posts

I dont think there is a way as the browser and the server needs the file extension to know what to do with the page and if it had no extension it would most likely just send out the raw code to the users which isnt good!The only way i know of to get a url like the one you posted is to use an index file and a folder, eg setup a folder called, in this example, "blah" and inside that folder put an index.HTM/.PHP file or similar and usually all the user will see is http://lyrics.url.com/
blah i think....As for the URL you posted that is of course using PHP to take the "/blah" as a variable and somehow use that to show content. Only thing is the link you gave doesnt go to a website so i dont know if its a real life example or just a theoretical example

Share this post


Link to post
Share on other sites

Apache mod_rewrite will allow the URL to your pages show like that, too. http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

Check out the URL when you navigate on this site.

Mod-rewrite is a standard feature of the sNews CMS system. http://www.snewscms.com/

 

The generated URLs are search engine friendly, can be indexed by the bots, and they are easier to use, too.

 

Of course, using the folder/index method works, too, but for truly dynamic content, try mod-rewrite. You need to set up an .htaccess file for the site and apply the rules according to your query string format.

Here is a sample of the .htaccess file as used by the sNews CMS:

RewriteEngine OnRewriteBase /snewsRewriteCond %{REQUEST_FILENAME} -fRewriteRule ^(.*) $1 [L]RewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php?category=$1 [L]RewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^([a-z_]+)/([^/]+) index.php?category=$1&title=$2 [L]RewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^([a-z_]+)/([^/]+)/([^/]+)/ index.php?category=$1&title=$2&commentspage=$3 [L]RewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^([a-z0-9_-]+)/([0-9]+)/ index.php?category=$1 articlespage=$2 [L]
The query string in this example will be inspected and the first string is the category, the second string is the title, etc.

search: Apache mod re-write for a full explanation of the tool and its usage.

Share this post


Link to post
Share on other sites

You can use a header, so the browser knows what kind of file it is. (anti-spam-content-type:) Html/Text for example. You can do it in html with a Meta-Tag <meta blabla> or in php with a header: Header("(anti-spam-content-type:) ");So i think it is possible

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.