Welcome Guest, Not a member yet? Register   Sign In
Routing URLs and trailing slashes
#7

(This post was last modified: 03-26-2015, 08:51 AM by peter.)

The problem is that I need urls like that mypage.html and mycategorie/, I need both.

So look my my complete routes.php

PHP Code:
$route['default_controller'] = "site";
$route['404_override'] = 'site/error_404';
$route['contact.html'] = "site/contact";
$route['buy-([0-9a-zA-Z-_+]+).html'] = "site/buy/$1";
$route['([0-9a-zA-Z-_+]+)/([0-9a-zA-Z-_+]+).html'] = "site/article/$1/$2";
$route['([0-9a-zA-Z-_+]+).html'] = "site/page/$1";
$route['([0-9a-zA-Z-_+]+)'] = "site/categorie/$1"// for my pages like that categorie/ 

Code:
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/?$ index.php?/$1/ [L]

Changing my htaccess doesn't change nothing Sad

I still have the same probleme, I can access to my page : http://site.com/categorie/ and http://site.com/categorie
There is any redirection.

I don't like my last roule :
PHP Code:
$route['([0-9a-zA-Z-_+]+)'] = "site/categorie/$1"// for my pages like that categorie/ 

But I see any other solution to make my categories like that categorie1/, categorie2/
Reply


Messages In This Thread
Routing URLs and trailing slashes - by peter - 03-25-2015, 06:43 AM
RE: Routing URLs and trailing slashes - by Rufnex - 03-25-2015, 09:13 AM
RE: Routing URLs and trailing slashes - by peter - 03-25-2015, 11:12 AM
RE: Routing URLs and trailing slashes - by Rufnex - 03-25-2015, 12:02 PM
RE: Routing URLs and trailing slashes - by Narf - 03-26-2015, 04:07 AM
RE: Routing URLs and trailing slashes - by peter - 03-26-2015, 08:48 AM
RE: Routing URLs and trailing slashes - by peter - 03-27-2015, 07:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB