htaccess

Alles, was den Apache betrifft, kann hier besprochen werden.

htaccess

Postby mahesh2150 » 01. December 2017 18:55

How do i remove /en /fr /hi from url?

Now, my website has duplicate content.

http://www.site.com/en/content/
http://www.site.com/content/

http://www.site.com/fr/content/
http://www.site.com/content/

I changed the site to only english and i dont need those urls anymore.
How can i remove those /en/ /fr from url if they are available?
mahesh2150
 
Posts: 1
Joined: 01. December 2017 18:51
XAMPP version: 1
Operating System: w10

Re: htaccess

Postby Nobbie » 02. December 2017 11:33

Edit your HTML Files and remove that token from the links, whatelse?

If you want to keep the links, but have the corresponding files in other directories, it seems to be the easiest way to do so by defining an ALIAS. I dont know what you already did (did you move your english files from htdocs/en/contents to htdocs/contents?), but depending on where you put the files, a proper ALIAS could look like:

Code: Select all
ALIAS /en/ c:/xampp/htdocs/


You did not tell us, where you want to change URLs and where you stored your files physically, that makes it difficult to give a unique advice. But you should get the idea of my advice.
Nobbie
 
Posts: 9818
Joined: 09. March 2008 13:04


Return to Apache

Who is online

Users browsing this forum: No registered users and 3 guests