removing forward slash after url
removing forward slash after url
I'm currently getting "www.site.com/subpage/" but I would rather have "www.site.com/subpage" how do I do this?
Re: removing forward slash after url
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
Re: removing forward slash after url
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
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
# 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]
# 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]
what would I change?
Re: removing forward slash after url
Hello,
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.
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]
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.
Re: removing forward slash after url
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.
Re: removing forward slash after url
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';
See http://wiki.cmsmadesimple.org/index.php ... l_Settings
Pierre