removing forward slash after url
Posted: Mon Oct 27, 2008 7:30 pm
I'm currently getting "www.site.com/subpage/" but I would rather have "www.site.com/subpage" how do I do this?
Content management as it is meant to be
https://forum.cmsmadesimple.org/
Change to empty in config.php: $config['page_extension'] = '';JaymeNYC wrote: I'm currently getting "www.site.com/subpage/" but I would rather have "www.site.com/subpage" how do I do this?
I have the config set up like you said above and this is my .htaccessalby wrote:Change to empty in config.php: $config['page_extension'] = '';JaymeNYC wrote: I'm currently getting "www.site.com/subpage/" but I would rather have "www.site.com/subpage" how do I do this?
and check in accord your .htaccess
Alby
JaymeNYC wrote: I'm currently getting "www.site.com/subpage/" but I would rather have "www.site.com/subpage" how do I do this?
You don't want trailing slashes ? You are right , btw. Just don't activate them.JaymeNYC wrote: # 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
Pierre M. wrote: Hello,
JaymeNYC wrote: I'm currently getting "www.site.com/subpage/" but I would rather have "www.site.com/subpage" how do I do this?Thx! after removing the 3 lines above it works without the trailing slash, but the trailing slash still works is there a way I can redirect the url with the trailing slash to the url without it?JaymeNYC wrote: # 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
You don't want trailing slashes ? You are right , btw. Just don't activate them.
I agree there is some problem with the currently shipped htaccess sample. The past sample hadn't this... flaw.
Just throw away those nasty 3 trailing slash adding lines.
Pierre M.
What aboutJaymeNYC wrote: Thx! after removing the 3 lines above it works without the trailing slash, but the trailing slash still works is there a way I can redirect the url with the trailing slash to the url without it?
Code: Select all
$config['page_extension'] = '.html';