Unless you REALLY want to do it without access index.php… in which case I’d have to take a closer look. It looks like you’re overdoing it a bit in the ReWrite code though.
You may be able to see what’s going on by putting “Logging” on like this:
I don’t mind setting the logout code to http://quinsa.net/index.php?ACT=10 ...Fine with me…. how do I set this, though? (and still have index.php removed for everything else?)
<div id="homeclientlogin_en"> <p> <a title="IMPORTANT! Remember to logout at the end of each session" href="http://quinsa.net/?ACT=10">Logout</a> </p> </div>
which is probably slightly different in your template - but the link should be something like this
<a title="IMPORTANT! Remember to logout at the end of each session" href="http://quinsa.net/index.php?ACT=10">Logout</a>
A better way, but depends if you’re in a user template or a system one - this won’t work for system templates is to put this into the HREF:
Logging goes from 0 (OFF) to 9 (ludicrous detail) and it can really help locate these faults.
but it should give you somewhere to start.
Great tip. I’m not having any problems, but I’ve got a ton of RewriteRules and I didn’t know about this option. One thing to note. The mod_rewrite docs say:
Using a high value for Level will slow down your Apache server dramatically! Use the rewriting logfile at a Level greater than 2 only for debugging!
So, only set a high Level until you get your problems resolved. After that, either comment out the RewriteLogLevel line or set the level to 0 or a low number.
@Nick Foxall - note that other URLs and functionality that rely on ?ACT=X may still not work. I can’t offer a solution to the file and directory check but, using Leevi’s .htaccess generator (which uses a modified variant of the include method), I’ve found that adding this line fixes the problem:
And after a lot of banging my head against the desk I’ve just found that this code helps fix the various system path issues with the include method as outlined in the wiki. I expect it could be written more economically, but have added it as is.
# Fix queries for actions, urls and css in EE RewriteCond %{QUERY_STRING} ^(ACT=.*)$ [NC,OR] RewriteCond %{QUERY_STRING} ^(URL=.*)$ [NC,OR] RewriteCond %{QUERY_STRING} ^(CSS=.*)$ [NC] RewriteRule ^(.*)$ /index.php\?&%{QUERY_STRING} [L]
I have gotten the index.php to be removed, but how do I make the temporary index.html show up? I followed the Wiki, but the index.php is showing in its place.
RewriteEngine on
# During build - redirect root to static index page RewriteCond %{REQUEST_URI} ^/$ RewriteRule $ http://www.example.com/index.html [R=302,L]
<Files 403.shtml> order allow,deny allow from all </Files>
<Files .htaccess> order allow,deny deny from all </Files>
#Change the default page DirectoryIndex index.html
RewriteBase /
# Add a trailing slash to paths without an extension RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ RewriteRule ^(.*)$ $1/ [L,R=301]
#Force access to site without "www" to have "www" RewriteCond %{HTTP_HOST} !^www\..* [NC] RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301,L]
None of these are working for me on localhost using MAMP, which is allegedly supposed to be ready to go out of the box.
Mod-rewrite is loaded. Still nothing but 404 errors.
I’m having probs using this in Mamp also. I have localhost:8888/ee-starter/ as my root url. I’ve got the urls to work correctly, but when clicking the links to those urls - it just shows a 404 error page.
I was having trouble with the include method and a slightly unconventional implementation of EE. Instead of structuring my site with template_groups {segment_1’s} per section, I did everything in the *site/index file. All references to purely nominal {segment_1’s} where dealt with and resolved within the same *site/index template.
However, removing the index.php with the include method either by hand or with Leevi’s extension simply returned a blank bage. Of course, there was no real /template_group/.
Solution is to hardcode the fuax-template groups (if you’re using Leevi’s addon) in the include rule:
Hi i need a little bit of help.
I have three requirements first one is to fix the page name with extension and second is variable name fixing and third is the www because i want to make my URL more shortlike below url
Now the relative URLs in my HTML linking to CSS and images are not working. What they are doing is treating my template name(s) as directories but only when a slash ‘/’ exists in the URI such as:
This works:
www.mysite.com/subdir/template
This does not:
www.mysite.com/subdir/template/
The CSS is then being accessed incorrectly as in:
www.mysite.com/subdir/template/css.css
instead of:
www.mysite.com/subdir/css.css
I realize that I can make all of my paths absolute but I wonder if there is a more elegant way around this issue?
To use Lodewijk plugin/workaround, simply download and install it, and add…
In my case:
{exp:replace find=”/index.php”}{pagination_links}{/exp:replace}
In others, this may be appropriate:
{exp:replace find=“index.php/”}{auto_path}{/exp:replace}
... in your pagination links, which solves the problem nicely.
However, I don’t exactly understand where I’m supposed to put the {exp ... code? I know it says “in your pagination links” but that’s not 100% clear to me.
cool-beans and starbucks-coffee are my template group names. I added the \‘s to escape the dashes in the template names as per someones suggestion earlier. I also added the ‘?’ to the /index.php?/$1 part.