Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION Add index.php to URL
#1
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
Reply
#2
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
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
@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
Reply
#4
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.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#5
@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
Reply




Users browsing this thread: 1 Guest(s)