[SOLVED] Pretty url with multilingual site not working

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
uloloi
Forum Members
Forum Members
Posts: 88
Joined: Thu Dec 16, 2010 8:50 pm

[SOLVED] Pretty url with multilingual site not working

Post by uloloi »

Hi all. I have problems to see pages, pretty_urls not working

building with CMS 1.11.6 this site: elfrijolito.com.mx
Trying this: http://docs.cmsmadesimple.org/configuration/pretty-url

And the pages are multilingual made with a tutorial by goran

home (redirects to language...)
-- en (english)
--- home
--- page 1
--- page 2, ...
-- es (spanish v.)
--- inicio
--- pagina 1
--- pag 2, ...

This site is located into a subfolder called /cms
I changed this into the .htacces file but nothing happens. I only get a 404 page, or it says that the page cannot be found

What could be the problem?
Last edited by uloloi on Mon Jan 06, 2014 10:05 pm, edited 1 time in total.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1974
Joined: Mon Jan 29, 2007 4:47 pm

Re: Pretty urls with miltilingual site not working

Post by Jo Morg »

uloloi wrote:This site is located into a subfolder called /cms
I changed this into the .htacces file but nothing happens. I only get a 404 page, or it says that the page cannot be found
And how exactly did you "changed this into the .htacces file"?
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
uloloi
Forum Members
Forum Members
Posts: 88
Joined: Thu Dec 16, 2010 8:50 pm

Re: Pretty urls with miltilingual site not working

Post by uloloi »

Well, the .htaccess (from doc/htacces.txt, cmsms 1.11.6)
has this lines:

Code: Select all

<IfModule mod_rewrite.c>
RewriteEngine on
#
#Sub-dir e.g: /cmsms  IN MY CASE subfolder is /cms
RewriteBase /cms

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# but ignore POST requests.
#RewriteCond %{REQUEST_URI} !/$
#RewriteCond %{REQUEST_URI} !\.
#RewriteCond %{REQUEST_METHOD} !POST$
#RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>

<IfModule mod_headers.c>
# Disable ETags
Header unset ETag
FileEtag None
# For Security
Header set X-Frame-Options "SAMEORIGIN"
</IfModule>
But RewriteBase /cms commented or not, pages not seen

Truely I don't know what to do to make it work, if the problem been here in the .htaccess or where is it, in other sites I haven't had this issue

I cleared cache, change confog, and so on, but still the problem
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Pretty urls with miltilingual site not working

Post by Rolf »

{metadata} tag in the head of your template?
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
uloloi
Forum Members
Forum Members
Posts: 88
Joined: Thu Dec 16, 2010 8:50 pm

Re: Pretty urls with miltilingual site not working

Post by uloloi »

Yes, I'm using bootstrap tpl

Code: Select all

  <head>
    <title>{if !empty($pagetitle)}...</title>
    {if isset($canonical)}<link rel="... />{/if} 
    {metadata} {* has: meta keywords, description and content-type *}
    <meta http-equiv="content-language" content="{$page_lang}" />
    <meta name='viewport' ... />
...
</head>
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Pretty urls with miltilingual site not working

Post by Rolf »

Where did you put the .htaccess file? It should be *in* your /cms folder beside the cmsms index.php file

Try to add the root_url line into the config.php:

Code: Select all

$config['root_url'] = 'http://www.elfrijolito.com.mx/cms';
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Pretty urls with miltilingual site not working

Post by velden »

At this moment your cmsms website is NOT in the /cms sub directory (at least not regarding the RewriteBase)
Working url: 'http://www.elfrijolito.com.mx/index.php?page=mainpage (and no '/cms' in it).

It is possible that your hosting provider does not allow or support .htaccess or mod_rewrite. In that case that would be the cause.

(error) log files of your web server would show you what's going on.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1974
Joined: Mon Jan 29, 2007 4:47 pm

Re: Pretty urls with miltilingual site not working

Post by Jo Morg »

HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)
....
Technical Information (for support personnel)

Go to Microsoft Product Support Services and perform a title search for the words HTTP and 404.
Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Web Site Setup, Common Administrative Tasks, and About Custom Error Messages.
That means that you are in a MS server???... IIRC it doesn't recognize .htaccess directives.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
uloloi
Forum Members
Forum Members
Posts: 88
Joined: Thu Dec 16, 2010 8:50 pm

Re: Pretty urls with miltilingual site not working

Post by uloloi »

Yes, I think the problem must be there, looking into phpinfo():
Server API CGI/FastCGI
SERVER_SOFTWARE Microsoft-IIS/6.0
...and it appears that MS-ISS 6.0 does not have URL rewrite capabilities

Php not running on Apache Server

What to do? CGI Apps use .htaccess? some server administrator must configure something?
Last edited by uloloi on Mon Jan 06, 2014 9:26 pm, edited 1 time in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Pretty urls with miltilingual site not working

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
uloloi
Forum Members
Forum Members
Posts: 88
Joined: Thu Dec 16, 2010 8:50 pm

Re: Pretty urls with miltilingual site not working

Post by uloloi »

Working! :D Thanks

how I can remove 'index.php' from the string in the file. htaccess?
http://elfrijolito.com.mx/[b]index.php[/b]/es/inicio

Thanks for all!
Last edited by uloloi on Mon Jan 06, 2014 10:04 pm, edited 1 time in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Pretty urls with miltilingual site not working

Post by Rolf »

You can't... It is a Windoze thing...
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: [SOLVED] Pretty url with multilingual site not working

Post by velden »

Maybe your IIS server and/or hosting provider supports URL rewriting too. But I don't expect you'll find much support for it here.

But, if you find out how it works, you might want to share it here for other IIS users.
Post Reply

Return to “The Lounge”