Jump to content

Domains or not rly


manix

Recommended Posts

Hey..

 

I've noticed how some websites have links with no file extensions at the end for example "www.somesite.com/home" and I thought that was done with some kind of other domains (before I read an article about subdomains addon domains and parked domains) and now I am absolutely clueless on how to do this. I'll be glad if someone enlightens me

Link to comment
Share on other sites

Okay I just took some time to educate myself about htaccess and after giving it a shot I realized that it would redirect any non-existing link to mysite.com/new and I don't need that. I only need mysite.com/new to display the file new.php, and like mysite.com/ne wouldn't display anything

Link to comment
Share on other sites

Hey..

 

I've noticed how some websites have links with no file extensions at the end for example "www.somesite.com/home" and I thought that was done with some kind of other domains (before I read an article about subdomains addon domains and parked domains) and now I am absolutely clueless on how to do this. I'll be glad if someone enlightens me

This is using apache mod_rewrite.  Whether or not the rules go into a .htaccess file or not, is related to your access to the server.  For many people, they don't have access to change their apache config, but rewrite rules can be placed directly in the apache config files for a vhost.

Okay I just took some time to educate myself about htaccess and after giving it a shot I realized that it would redirect any non-existing link to mysite.com/new and I don't need that. I only need mysite.com/new to display the file new.php, and like mysite.com/ne wouldn't display anything

 

This is using apache mod_rewrite.  Whether or not the rules go into a .htaccess file or not, is related to your access to the server.  For many people, they don't have access to change their apache config, but rewrite rules can be placed directly in the apache config files for a vhost, so it's a bit misleading to say that this is done by htaccess.  htaccess is just a file that apache can be configured to read which allows you to override default settings for files in that directory -- one of the settings being mod_rewrite rules.

 

mod_rewrite utilizes in most cases regular expression syntax.  The Link Zul provided does a pretty good job of laying out a number of different uses.  As you can see from that page, mod_rewrite is a toolkit that facilitates SEO friendly url's but can be used to do a number of other things as well.

 

The problem you describe is related to your rewrite rule(s).  If you're having problem with a specifc set of rules then you might want to post them and ask for help.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.