Just getting started w/ EE!
How do I set the url to /test-page instead of /index.php/test-page ?
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
July 20, 2012 7:49am
Subscribe [3]#1 / Jul 20, 2012 7:49am
Just getting started w/ EE!
How do I set the url to /test-page instead of /index.php/test-page ?
#2 / Jul 20, 2012 8:14am
Hi goroboto
**Note** All web server can be slightly different with htaccess but hope this helps.
Firstly you will need to create a “.htaccess” file in the root of your web server then
in that files enter
RewriteEngine On
#Remove index.php from urls
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]Some web servers wont need the question mark after index.php so in your htaccess file you would have
RewriteEngine On
#Remove index.php from urls
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]After you have done that login to your backend and go to Admin -> General Configuration and change
“URL to the root directory of your site” from http://www.site.com/index.php to http://www.site.com/
It would be worth reading up on htaccess by just googling around and getting comfortable with what it is capable of but a more accurate resource for your current q is
Hope this helps, good luck with ee its worth learning!
#3 / Jul 20, 2012 3:00pm
Hey goroboto,
DigitalDoctors is right!
Can you give the .htaccess file a go and let us know the results?
Cheers,
#4 / Jul 20, 2012 9:13pm
That worked! Just gotta start digging into that wiki more. Thanks!
#5 / Jul 23, 2012 4:02pm
Hi goroboto,
Welcome to ExpressionEngine and the Forums!
I’m glad Shane and DigitalDoctors got you on the right track!
Let us know if you ever need anything else.
Cheers,