htaccess change pretty urls
Permalink
Hi,
Unfortunately I know very little about the htaccess code used with pretty urls- I'm trying to change it (or the php, whatever is necessary) so that it does not create subdirectories for sub-levels in the navigation. The reason for this is I am migrating a site and want to point all the old .html urls to my new site, and the current setting sends mypage.html to /subdirectory/mypage/ instead of to /mypage.
My current htaccess code is as follows:
# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php
# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
RewriteRule ^(.*)\.html$ $1/ [NC]
</IfModule>
# -- concrete5 urls end --
redirect 301 /audio.html /messages.html
#audio is also a subdirectory so must rename page.
Thanks so much for your help!
Unfortunately I know very little about the htaccess code used with pretty urls- I'm trying to change it (or the php, whatever is necessary) so that it does not create subdirectories for sub-levels in the navigation. The reason for this is I am migrating a site and want to point all the old .html urls to my new site, and the current setting sends mypage.html to /subdirectory/mypage/ instead of to /mypage.
My current htaccess code is as follows:
# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php
# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
RewriteRule ^(.*)\.html$ $1/ [NC]
</IfModule>
# -- concrete5 urls end --
redirect 301 /audio.html /messages.html
#audio is also a subdirectory so must rename page.
Thanks so much for your help!