1
   

.htaccess problems. Does not seem to work.

 
 
Reply Tue 6 Jul, 2004 03:00 pm
mod_rewrite 1.0.0

I have tried the mod in both public_html "I believe this to be the root" and MyDomain/Board which is the directory I put PHPBB.

It seems to make no difference because the links are still not static.

I started of with the .htaccess in the mode and then came to this forum and used the code at the top of this thread.

************************
RewriteEngine on
RewriteCond %{HTTP_HOST} !^.*MyDomain\.info [NC]
RewriteRule (.*) http://www.MyDomain.info/board/$1 [R=301,L]
************************

Further I had no luck with the static urls mod 1.0. I get 404 errors in the topics when I make changes to the includes/page_header.

I can not see that it makes a difference but I have also implemented Able2Know.com Search Engine Optimization 2.0.0
with no apparent problems but there could be some that I am not aware of. Not sure how to check and see if the mods are working or not. I can tell that the dates are no longer links and tell that other obvious mods do work but I could be missing something.

Cool mod, I hope I get it working.
Keep up the good work.

Your spell check on this site is totaly cool since I can't spell. I think I will use it on my site after I get your mod going. If you did not get the mod from PHPBB.com let me know.
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 1 • Views: 4,161 • Replies: 13
No top replies

 
Craven de Kere
 
  1  
Reply Tue 6 Jul, 2004 03:08 pm
The htaccess code goes in the same directory as the phpbb install.

Use the right htaccess code and put it in the right place and if your server is configured to allow mod_rewrite it will work.

The code you posted there has nothing to do with the phpbb mod. Use the code in the mod Idea
0 Replies
 
Arthur1972
 
  1  
Reply Tue 6 Jul, 2004 03:48 pm
I was told that mod_rewrite is on by my hosting company
I placed the code in
/public_html/board/ this is where I installed PHPBB 2.0.8
I callled the file .htaccess

I have used the code in both these ways
RewriteRule ^"forums.* index.php [L,NC]
RewriteRule ^"board.* index.php [L,NC]

Current is the following
RewriteEngine On
RewriteRule ^"board.* index.php [L,NC]
RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?p=$1&highlight=$2 [L,NC]
RewriteRule ^post-([0-9]*).* viewtopic.php?p=$1 [L,NC]
RewriteRule ^view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=viewresult [L,NC]
RewriteRule ^about([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?t=$1&highlight=$2 [L,NC]
RewriteRule ^about([0-9]*).html&view=newest viewtopic.php?t=$1&view=newest [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*).* viewtopic.php?t=$1&start=$2 [L,NC]
RewriteRule ^about([0-9]*).* viewtopic.php?t=$1 [L,NC]
RewriteRule ^about([0-9]*).html viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
RewriteRule ^mark-forum([0-9]*).html* viewforum.php?f=$1&mark=topics [L,NC]
RewriteRule ^updates-topic([0-9]*).html* viewtopic.php?t=$1&watch=topic [L,NC]
RewriteRule ^stop-updates-topic([0-9]*).html* viewtopic.php?t=$1&unwatch=topic [L,NC]
RewriteRule ^forum-([0-9]*).html viewforum.php?f=$1 [L,NC]
RewriteRule ^forum-([0-9]*).* viewforum.php?f=$1 [L,NC]
RewriteRule ^topic-([0-9]*)-([0-9]*)-([0-9]*).* viewforum.php?f=$1&topicdays=$2&start=$3 [L,NC]
RewriteRule ^ptopic([0-9]*).* viewtopic.php?t=$1&view=previous [L,NC]
RewriteRule ^ntopic([0-9]*).* viewtopic.php?t=$1&view=next [L,NC]
0 Replies
 
Craven de Kere
 
  1  
Reply Tue 6 Jul, 2004 03:57 pm
Try removing: RewriteRule ^"board.* index.php [L,NC]

Alternately, put replace all the ^'s with a slash

Try both of those changes.
0 Replies
 
cdphreaker
 
  1  
Reply Sun 26 Jun, 2005 05:28 pm
This worked!! Thanks for all the help and information.
Craven de Kere wrote:
Try removing: RewriteRule ^"board.* index.php [L,NC]

Alternately, put replace all the ^'s with a slash

Try both of those changes.


I went through almost all of the forum to solve my .htaccess problem! And this thing here sorted that out!! Thanks a lot Craven de Kere. Can you also post a tutorial or guide on .htaccess writing. That'd be of great help!!

Thanks.
0 Replies
 
cdphreaker
 
  1  
Reply Sun 26 Jun, 2005 05:46 pm
forgot to mention...
This mod is working fine with phpbb 2.0.15 confirmed.
0 Replies
 
Craven de Kere
 
  1  
Reply Tue 28 Jun, 2005 11:59 pm
Re: This worked!! Thanks for all the help and information.
cdphreaker wrote:
Can you also post a tutorial or guide on .htaccess writing. That'd be of great help!!


http://httpd.apache.org/docs/mod/mod_rewrite.html

Knowing regular expressions well will help.
0 Replies
 
dlin2000
 
  1  
Reply Sat 2 Jul, 2005 01:27 am
i am having a similar problem, i've done as instructed, and the urls are not rewriting.

i've cleared out some possiblilities of my own server errors.

i run my own freebsd server, i've pointed apache diretory to
/work/website/, due to restriction of my cable access, my httpd port is on 8080, therefore my url would look like http://www.mydomain.com:8080//index.php?c=1 when i access forum 1.

i've also checked my mod_rewrite and made sure that it is on by doing the <?phpinfo()> and checked the httpd.conf

i installed phpbb in /work/website/ and the .htaccess file is in the same directory, and .htaccess file is from your txt document.
Quote:

RewriteEngine On
RewriteRule ^forums.* index.php [L,NC]
RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?p=$1&highlight=$2 [L,NC]
RewriteRule ^post-([0-9]*).* viewtopic.php?p=$1 [L,NC]
RewriteRule ^view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=viewresult [L,NC]
RewriteRule ^about([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?t=$1&highlight=$2 [L,NC]
RewriteRule ^about([0-9]*).html&view=newest viewtopic.php?t=$1&view=newest [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*).* viewtopic.php?t=$1&start=$2 [L,NC]
RewriteRule ^about([0-9]*).* viewtopic.php?t=$1 [L,NC]
RewriteRule ^about([0-9]*).html viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
RewriteRule ^mark-forum([0-9]*).html* viewforum.php?f=$1&mark=topics [L,NC]
RewriteRule ^updates-topic([0-9]*).html* viewtopic.php?t=$1&watch=topic [L,NC]
RewriteRule ^stop-updates-topic([0-9]*).html* viewtopic.php?t=$1&unwatch=topic [L,NC]
RewriteRule ^forum-([0-9]*).html viewforum.php?f=$1 [L,NC]
RewriteRule ^forum-([0-9]*).* viewforum.php?f=$1 [L,NC]
RewriteRule ^topic-([0-9]*)-([0-9]*)-([0-9]*).* viewforum.php?f=$1&topicdays=$2&start=$3 [L,NC]
RewriteRule ^ptopic([0-9]*).* viewtopic.php?t=$1&view=previous [L,NC]
RewriteRule ^ntopic([0-9]*).* viewtopic.php?t=$1&view=next [L,NC]

i've tried what you said about the slashes and it didnt work for me.

I'm wondering if it can be the port 8080 that's causing the problem.

by the way, my other .htaccess files that restrict access by ip, username/password authentication all works alright.

Thanks for your help.
0 Replies
 
dlin2000
 
  1  
Reply Sun 3 Jul, 2005 04:05 pm
somehow i fixed the last problem, the mod_rewrite is working, but another problem arises.

mod_rewrite changes the address alright, but then it does not create a file, therefore i get a 404 error, but all this only happen when users are not logged in. and it created a log on my machine "File does not exist: /work/website/forum-1.html"

on the browser it shows "Not Found
The requested URL /forum-1.html was not found on this server."

for logged in users(probably cos they have a session id), the address does not change for them, it still stays as before.

what could be the problems? any guesses? i've been looking around and running out of ideas.

thanks
0 Replies
 
dlin2000
 
  1  
Reply Sun 3 Jul, 2005 07:40 pm
alright, i've fixed everything

seems like .htaccess doesnt want to work for me, so i've decided to manually add a directory in the httpd.conf to make sure rewrite works, and it does.

for your future reference.

thanks for your module
0 Replies
 
Craven de Kere
 
  1  
Reply Wed 6 Jul, 2005 12:33 am
dlin2000 wrote:
mod_rewrite changes the address alright, but then it does not create a file, therefore i get a 404 error, but all this only happen when users are not logged in. and it created a log on my machine "File does not exist: /work/website/forum-1.html"


I just want to clarify something that a lot of people are confused about.

mod_rewrite does not create files, not does it change your links on your site.

In my mod, php functions generate links to "static" pages that do not exist, and mod_rewrite just performs the task of requesting the real files when the user requests the fake urls.

Anywho, glad you cleared up your problems.
0 Replies
 
brand beatrice
 
  1  
Reply Fri 7 Oct, 2005 10:10 pm
i have the same problem. i have tried all solutions posted so far. no results. i would try this one - add a directory in the httpd.conf to make sure rewrite works - but i have no idea how to do it.
BBeatrice


p.s. - a few more details -

Same issue:
if they are not logged in they can not access any links(4...ohh...4). as soon as they log in everything is ok.
i didn't post the link as i want to respect the rules, but if there is a need i can e-mail it to whom it may request it. thank you.
0 Replies
 
majorflam
 
  1  
Reply Sat 26 Nov, 2005 03:04 pm
I got the static urls working fine, but one problem.

If someone clicks a link for my site, and that link is provided by a logged in user (therefore a php file), this will cause the browser to be sent to the log-in page.

Is this right? Surely the redirect should be to the html page?
0 Replies
 
dax702
 
  1  
Reply Thu 29 Jun, 2006 10:08 pm
I'm having the same problem with the 404 page coming up when not logged in, and when I AM logged in, the static URLs are not written..
0 Replies
 
 

Related Topics

In How much time a website can be developed? - Question by aussiejumpingcastle
Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » .htaccess problems. Does not seem to work.
Copyright © 2019 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 10/15/2019 at 08:27:03