.htaccess question
btblue
Joined: 2006-01-07
Posts: 64 |
Posted: Sun, 2010-11-14 19:46 |
I changed RewriteBase in .htaccess to RewriteBase /lloydsppitalnikphotography and that removed index.php from the home page URL. The problem is when I go to an Album Page or Photo page, index.php is still there as in |
|
Posts: 7994
Hm. Rewrite isn't really working, though, eg: http://www.lloydspitalnikphotography.com/recent_work gives me a 404. You might chat with Hostmonster about this and see if they have any tips.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 64
That's the problem. I have to include index.php as in http://lloydspitalnikphotography.com/index.php/recent_work
I've gone into .htaccess and followed the instructions
Here is the section I changed:
# <IfModule mod_rewrite.c>
RewriteBase /~lloydspitalnikphotography.com
# </IfModule>
Do I have to put a RewriteBase for each individual album?
Posts: 304
This should do the trick:
RewriteBase /
--
http://inposure.se/
Posts: 64
changed it to RewriteBase / and still it shows index.php when I go to any album. Thanks for trying. I'm at a loss.
Here's how .htaccess looks now:
# <IfModule mod_rewrite.c>
RewriteBase /
# </IfModule>
Posts: 16504
Also, if G3 is installed at the root of your site as it appears, RewriteBase should be / not /lloyds....
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 64
Hi Kevin,
I have RewriteBase set like this:
# <IfModule mod_rewrite.c>
RewriteBase /
# </IfModule>
It still gives me index.php in the albums. Home page works properly. Just trying to figure out how to remove index.php from albums and photos.
Thanks for any help.
Posts: 16504
That should look a lot more like this:
EDIT (oops, fixed commented lines)
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 64
Hi Kevin,
I hate to be a pain in the butt. I copy and pasted your code into .htaccess and now I get
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator,
and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Apache Server at lloydspitalnikphotography.com Port 80
So I changed it back to before. Any other ideas? THan ks for your time and effort
Posts: 16504
ok. try commenting out the "if module" stuff:
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 64
Hi again,
Here's what the .htaccess looks like now and still no success
# <IfModule mod_rewrite.c>
# </IfModule>
Posts: 16504
Where are your rewrite rules?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 64
So now I'm feeling stupid and perhaps I am.
This is how .htaccess looks now. Is this correct?
# <IfModule mod_rewrite.c>
#Options +FollowSymLinks
# RewriteEngine On
# RewriteBase /
#RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule ^(.*)$ index.php?kohana_uri=$1 [QSA,PT,L]
# RewriteRule ^$ index.php?kohana_uri=$1 [QSA,PT,L]
# RewriteRule ^index.php/(.*) $1 [QSA,R,L]
# </IfModule>
It still isn't working the way I'd like.
Posts: 64
So now I'm feeling stupid and perhaps I am.
This is how .htaccess looks now. Is this correct?
# <IfModule mod_rewrite.c>
#Options +FollowSymLinks
# RewriteEngine On
# RewriteBase /
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule ^(.*)$ index.php?kohana_uri=$1 [QSA,PT,L]
# RewriteRule ^$ index.php?kohana_uri=$1 [QSA,PT,L]
# RewriteRule ^index.php/(.*) $1 [QSA,R,L]
# </IfModule>
It still isn't working the way I'd like.
Posts: 1857
Not sure if I'm following. Did you remove the commenting from the actual file? Take out the "#" at the beginning of each line in that section.
Posts: 16504
Download and rename your .htaccess to something like htaccess.txt. Then attach it to this thread.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 64
Here it is Kevin.
Posts: 1857
Take the "#" signs out of the last section as I wrote above. Take out the "#" at the beginning of each line in that section.
Posts: 64
Hi Kevin,
I got it working
I believe I was leaving # on the first and last lines or the opening and closing. I really appreciate your time like you can't imagine.
Thanks.
On a different note. I have Gallery 3 on a diferent server as thre Gallery 2 server doesn't have Apache 2.xx
I'm totally afraid to move Gallery 2 to the new server in feaqr that I'll screw it up. Any advice or would you do it for a fee?
Posts: 64
Thanks tempg, that did the trick. I feel so dumb.