Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION index.php to /
#1
how to make redirect from mysite.ru/index.php to mysite.ru/ for main page?

PS
I'm using fancy URLS
Reply
#2
Code:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ / [R=301,L]


This works fine.
Reply
#3
Normally you don't see index.php in the url, so I don't see why you would need that.
Reply
#4
So people cant bookmark or use old urls that are not fancy.

This is a method of forcing canonical urls, it might be wise to modify that regex to also pass the id? arguments as a second pathing id also or whatever your permalink structure is

index.php?id
/id/
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)