Posts: 5
Threads: 1
Joined: Nov 2014
Hi,
Now, URL is:
http://demo.com/parentdemo/demo.html
I Need to custom URL to:
http://demo.com/index.php/parentdemo/demo.html
Reason: Because My old website using joomla with this link, i want to keep old link for SEO.
Thanks
Posts: 6,266
Threads: 181
Joined: Sep 2011
http://demo.com/index.php/parentdemo/demo.html
that url makes no sense and you should avoid using it
you can setup a permanent redirect in htaccess to tell seo to goto the new page
Posts: 5
Threads: 1
Joined: Nov 2014
@shawn_a
Thanks! But the problems is my customer want to use that link. Any way can do that?
Or can redirect from any link have index.php to no index.html
Ex:
http://demo.com/index.php/parentdemo/demo.html =>
http://demo.com/parentdemo/demo.html
htaccess? Can you help me write rule?
Thanks
Posts: 6,266
Threads: 181
Joined: Sep 2011
Someone can , if not I'll see if I have one, also there is probably and example in the forums.
But yeah that url makes no sense it has 2 files, although allows it might break some stuff on some servers or path parsing in pugins, also it is not a common or used pattern that I have ever seen. Your customer is confused.
Posts: 5
Threads: 1
Joined: Nov 2014
2014-11-17, 14:32:39
(This post was last modified: 2014-11-17, 15:09:17 by loveelok.)
@shawn_a
I tried .htaccess:
Quote:RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^index.php/(.*)$ $1 [R=301,L]
RewriteRule ([A-Za-z0-9-]+).html$ index.php?id=$1 [QSA,L]
In Admin CP Custom Permalink Structure::
Quote:index.php/%parent%/%slug%.html
And It working with index.php/ in url!
This Link:
http://demo.com/index.php/parentdemo/demo.html
Now is working. But i don't know it optimized or not