Is this htaccess code really right ?
Permalink
Hi,
I have to say I am completly lost with the url rewriting thing ... I've been reading about 50 different posts and the documentation trying any possible way but I'm getting nowhere. Hope someone will be able to help ...
What I'm trying to do is enable pretty urls , and get rid of the index.php that always shows in the url (index.php/section/file.php)
My configuration at the moment is as follow:
My htaccess has
<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]
</IfModule>
My main menu links have this format index.php?cID=223
My issues :
1 - Urls like thishttp://mysite.com/en/something do not work (internal server error) buthttp://mysite.com/index.php/en/something... works (it needs the index.php)
2 - When I click a link (ie : index.php?cID=223) fromhttp://mysite.com/index.php/en/something... I get a 404 error because the url is converted tohttp://mysite.com/index.php/en/index.php?cID=191...
My doubts
2 - Am I doing the right thing linking to pages this way index.php?cID=223 ? Or maybe should it be something else ?
1 - The ht.access does go in the htt_docs or www folder right ?
Anyone would be kind enough to tell me what I am doing wrong and what I should be doing to get all this working please ?
Many thanks in advance ....
I have to say I am completly lost with the url rewriting thing ... I've been reading about 50 different posts and the documentation trying any possible way but I'm getting nowhere. Hope someone will be able to help ...
What I'm trying to do is enable pretty urls , and get rid of the index.php that always shows in the url (index.php/section/file.php)
My configuration at the moment is as follow:
My htaccess has
<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]
</IfModule>
My main menu links have this format index.php?cID=223
My issues :
1 - Urls like thishttp://mysite.com/en/something do not work (internal server error) buthttp://mysite.com/index.php/en/something... works (it needs the index.php)
2 - When I click a link (ie : index.php?cID=223) fromhttp://mysite.com/index.php/en/something... I get a 404 error because the url is converted tohttp://mysite.com/index.php/en/index.php?cID=191...
My doubts
2 - Am I doing the right thing linking to pages this way index.php?cID=223 ? Or maybe should it be something else ?
1 - The ht.access does go in the htt_docs or www folder right ?
Anyone would be kind enough to tell me what I am doing wrong and what I should be doing to get all this working please ?
Many thanks in advance ....
Also, your .htaccess should be in the base directory (or sub-directory) where C5 is installed. It must also be readable by all (chmod 644).
Hi , thanks for the reply, in fact I just put the En as an example , it can be anything there in fact , in this case it is for the english language, but I can't add this to the htaccess as this will only apply in the case, english is selected ... not sure I'm very clear .. let me know if not !many thanks
Htacces is in the concrete directory and chmod as it should...
Htacces is in the concrete directory and chmod as it should...
Where is concrete5 installed? in the webroot / or in the /en subdirectory?
In the web root, "en" is only the parent for the english files , just like "sp" or "po" , it is not a folder.
Are you using a custom .htaccess or the one generated by C5 install? Mine looks like this for subdirectory /it
Options +FollowSymLinks RewriteEngine on RewriteBase /it/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L]
Yes this htaccess is the one generated by concrete ... After reading all the posts I also realized that it is slightly different, but it is as I posted it here ... I just tried changing it with your format but it does not do anything ! God I'm stuck !
I really don't think C5 like the /en parent structure you are trying to impose on it. Just a guess. You did enable "Pretty URL's) in the controll panel and try to clear your cache via control panel?
I'm not trying to impose it , this is how it comes on its own ! I have 3 languages set up , en , sp, po ...
Supposedly , if I want to get to a page in English I should be able to do so using the urlhttp://mysite.com/en/nameoftheresurce...
But it does not work that way for me , I have to puthttp://mysite.com/index.php/en/nameoftheresurce... to get to it , that is one thing...
Supposedly , if I want to get to a page in English I should be able to do so using the urlhttp://mysite.com/en/nameoftheresurce...
But it does not work that way for me , I have to puthttp://mysite.com/index.php/en/nameoftheresurce... to get to it , that is one thing...
Sorry, I was unaware and unfamiliar with the new language functionality. Did you try clearing the cache?
Yes I did !no prob It's always kind of you to try and help !!!
Did you see this?
http://www.concrete5.org/documentation/how-tos/editors/building-sit...
Does this site look like what you want (see link at bottom of above URL)?
http://www.concrete5.org/documentation/how-tos/editors/building-sit...
Does this site look like what you want (see link at bottom of above URL)?
Yes it is ... Is this like a different method than the one offered by the "multilingual" add on ?
Is concrete5 in / or sub-directory /en/ ?