Elxis CMS Forum
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: IOS Reservations online hotel booking system for Elxis CMS.
 
Pages: [1]
  Print  
Author Topic: Url Rewriting  (Read 1812 times)
katsuya
Newbie
*
Offline Offline

Posts: 12


« on: June 09, 2011, 10:54:03 »

Hello,
I have a problem to manage languages ​​on my website.
The default language is French, rewritting The url works on almost all pages. When I put my site in English, url rewrinting works everywhere.

For example:
in version by default page:
http://localhost/reservation-hotel/login.html sends me a 404, I am forced to manually change the url: http://localhost/reservation-hotel/fr/login.html for failing to error.

While in the English version, I manage to disconnect Desuite, the URL that appears is: http://localhost/reservation-hotel/en/login.html.

Here is my. httaccess:
Code:
RewriteEngine ON
RewriteBase /reservation-hotel/

RewriteCond %{QUERY_STRING} !mylang=[english|french]{2,}

#RewriteRule ^([en]{2})/(.*)$ /index.php?mylang=english [QSA,L]
#RewriteRule ^([fr]{2})/(.*)$ /index.php?mylang=french [QSA,L]
RewriteRule ^([fr]{2})/(.*)$ /reservation-hotel/index.php?mylang=french [QSA,L]
RewriteRule ^([en]{2})/(.*)$ /reservation-hotel/index.php?mylang=english [QSA,L]

RewriteRule ^(administrator/|bridges/|cache/|components/|editor/|help/|images/|includes/|language/|mambots/|media/|modules/|templates/|tmpr/) - [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/ index.php
thank
Logged
webgift
Elxis Team
Hero Member
*****
Offline Offline

Posts: 3293



WWW
« Reply #1 on: June 09, 2011, 11:34:48 »

Hello ,
1rt of all remove the lines :
RewriteRule ^([fr]{2})/(.*)$ /reservation-hotel/index.php?mylang=french [QSA,L]
RewriteRule ^([en]{2})/(.*)$ /reservation-hotel/index.php?mylang=english [QSA,L]
and uncomment the lines :
#RewriteRule ^([en]{2})/(.*)$ /index.php?mylang=english [QSA,L]
#RewriteRule ^([fr]{2})/(.*)$ /index.php?mylang=french [QSA,L]
to :
RewriteRule ^([en]{2})/(.*)$ /index.php?mylang=english [QSA,L]
RewriteRule ^([fr]{2})/(.*)$ /index.php?mylang=french [QSA,L]

Make the tests and inform us again!
Logged

katsuya
Newbie
*
Offline Offline

Posts: 12


« Reply #2 on: June 09, 2011, 14:07:32 »

I did the test with you. htaccess the site in the default language for ever the same errors and the site in English does not even show it redirects me to my directory or there all my websites
Logged
webgift
Elxis Team
Hero Member
*****
Offline Offline

Posts: 3293



WWW
« Reply #3 on: June 09, 2011, 14:36:47 »

- Have you renamed the file from htaccess.txt to .htaccess
- Now change the line :
RewriteBase /reservation-hotel/
to
RewriteBase /

Save the .htaccess and inform us.
It's a local installation right ?
--
Read this article : Work locally with Apache and virtual hosts
With that you don't need to write each time : http://localhost/local_elxis_folder but ... just for example : elxis.loc at your browser's URL area.
« Last Edit: June 09, 2011, 14:40:14 by webgift » Logged

katsuya
Newbie
*
Offline Offline

Posts: 12


« Reply #4 on: June 09, 2011, 14:55:56 »

I rename the htaccess.txt to. htaccess.
I use the SEO PRO.
I am locally (error may be coming from?)
By changing RewriteBase / hotel-reservation / to RewriteBase / I can only see the homepage of the site
thank you
Logged
webgift
Elxis Team
Hero Member
*****
Offline Offline

Posts: 3293



WWW
« Reply #5 on: June 09, 2011, 15:25:22 »

Basically you don't need SEO PRO extensions be enabled at your local installation.
If you plan to publish that area at internet then i could help you more regarding that.
Logged

katsuya
Newbie
*
Offline Offline

Posts: 12


« Reply #6 on: June 09, 2011, 15:29:51 »

Thank you for your help,
 I turn off the SEO Pro and I would see if there are still problems after the site went live.
Logged
webgift
Elxis Team
Hero Member
*****
Offline Offline

Posts: 3293



WWW
« Reply #7 on: June 09, 2011, 19:34:50 »

Ok. I will be waiting your reply back in case that you'll face such an issue. Wink
Logged

Pages: [1]
  Print  
 
Jump to: