.htaccess not working properly on XAMPP

phpBB3 SEO Mixed mod Rewrite support forum. This mods performs URL rewriting for phpBB3, injecting forums in their URLs and keeping a static rewriting for topics.

Moderator: Moderators

.htaccess not working properly on XAMPP

Postby octane123 » Tue Feb 23, 2010 3:24 pm

Hi Gurus,

I downloaded the latest version of phpbb-seo kit from the portal and setup a portal on XAMPP.
When I try to configure URL rewriting in simple/mixed modes, I'm getting issues.I didnt try advanced mode as the basic ones are not working. I tried searching this forum , got some threads , but I'm unable to fix the issue, hence this post. , here are the details:

created a directory 2tasty in the root directory(means my portal will work if i try localhost/2tasty, I have some other portals working out as local/portal1 etc), copied all the files there, followed the instructions to create .htaccess file and placed it in the physical directory that maps to localhost/2tasty. When I try mixed more rewrite, I get the below message

"Error 404 localhost
02/23/10 20:46:11
Apache/2.2.12 (Win32) DAV/2 mod_ssl/2.2.12 OpenSSL/0.9.8k mod_autoindex_color PHP/5.3.0 mod_perl/2.0.4 Perl/v5.10.0"

on my chrome browser. Pls find below the contents from htaccess. Please go through and let me know how I can get this fixed.

Please help to get his fixed.
Thanks in advance.


# Lines That should already be in your .htacess
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>

# You may need to un-comment the following lines
# Options +FollowSymlinks
# To make sure that rewritten dir or file (/|.html) will not load dir.php in case it exist
# Options -MultiViews
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
RewriteEngine On
# REWRITE BASE
RewriteBase /
# HERE IS A GOOD PLACE TO FORCE CANONICAL DOMAIN
# RewriteCond %{-http_HOST} !^localhost$ [NC]
# RewriteRule ^(.*)$ -http://localhost/$1 [QSA,L,R=301]

# DO NOT GO FURTHER IF THE REQUESTED FILE / DIR DOES EXISTS
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
#####################################################
# PHPBB SEO REWRITE RULES ALL MODES
#####################################################
# AUTHOR : dcz -http://www.phpbb-seo.com
# STARTED : 01/2006
#################################
# FORUMS PAGES
###############
# FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. "forum" REQUIRES TO BE SET AS FORUM INDEX
RewriteRule ^/2tasty/forum\.html$ /2tasty/index.php [QSA,L,NC]
# FORUM ALL MODES
RewriteRule ^/2tasty/(forum|[a-z0-9_-]*-f)([0-9]+)(-([0-9]+))?\.html$ /2tasty/viewforum.php?f=$2&start=$4 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER ALL MODES
RewriteRule ^/2tasty/(forum|[a-z0-9_-]*-f)([0-9]+)/(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /2tasty/viewtopic.php?f=$2&t=$4&start=$6 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER ALL MODES
RewriteRule ^/2tasty/announces/(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /2tasty/viewtopic.php?t=$2&start=$4 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM ALL MODES
RewriteRule ^/2tasty/([a-z0-9_-]*)/?(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /2tasty/viewtopic.php?forum_uri=$1&t=$3&start=$5 [QSA,L,NC]
# PHPBB FILES ALL MODES
RewriteRule ^/2tasty/resources/[a-z0-9_-]+/(thumb/)?([0-9]+)$ /2tasty/download/file.php?id=$2&t=$1 [QSA,L,NC]
# PROFILES ALL MODES WITH ID
RewriteRule ^/2tasty/(member|[a-z0-9_-]*-u)([0-9]+)\.html$ /2tasty/memberlist.php?mode=viewprofile&u=$2 [QSA,L,NC]
# USER MESSAGES ALL MODES WITH ID
RewriteRule ^/2tasty/(member|[a-z0-9_-]*-u)([0-9]+)-(topics|posts)(-([0-9]+))?\.html$ /2tasty/search.php?author_id=$2&sr=$3&start=$5 [QSA,L,NC]
# GROUPS ALL MODES
RewriteRule ^/2tasty/(group|[a-z0-9_-]*-g)([0-9]+)(-([0-9]+))?\.html$ /2tasty/memberlist.php?mode=group&g=$2&start=$4 [QSA,L,NC]
# POST
RewriteRule ^/2tasty/post([0-9]+)\.html$ /2tasty/viewtopic.php?p=$1 [QSA,L,NC]
# ACTIVE TOPICS
RewriteRule ^/2tasty/active-topics(-([0-9]+))?\.html$ /2tasty/search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
# UNANSWERED TOPICS
RewriteRule ^/2tasty/unanswered(-([0-9]+))?\.html$ /2tasty/search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
# NEW POSTS
RewriteRule ^/2tasty/newposts(-([0-9]+))?\.html$ /2tasty/search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
# THE TEAM
RewriteRule ^/2tasty/the-team\.html$ /2tasty/memberlist.php?mode=leaders [QSA,L,NC]
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

# FORUM WITHOUT ID & DELIM ALL MODES (SAME DELIM)
# THESE FOUR LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/2tasty/([a-z0-9_-]+)(-([0-9]+))\.html$ /2tasty/viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/2tasty/([a-z0-9_-]+)\.html$ /2tasty/viewforum.php?forum_uri=$1 [QSA,L,NC]
# FIX RELATIVE PATHS : FILES
RewriteRule ^/2tasty/.+/(style\.php|ucp\.php|mcp\.php|faq\.php|download/file.php)$ /2tasty/$1 [QSA,L,NC,R=301]
# FIX RELATIVE PATHS : IMAGES
RewriteRule ^/2tasty/.+/(styles/.*|images/.*)/$ /2tasty/$1 [QSA,L,NC,R=301]
# END PHPBB PAGES
#####################################################
octane123
 
Posts: 1
Joined: Tue Feb 23, 2010 3:05 pm

Advertisement

Re: .htaccess not working properly on XAMPP

Postby austin881 » Wed Feb 24, 2010 4:04 am

Replace
RewriteBase /
with
RewriteBase /2tasty/

Then remove /2tasty from the front of all the rest of the lines.
My dev playground: ModernDignity.com
Appreciate my assistance? You can thank me by linking to Chevy Truck Forum or Gas Scooters.
User avatar
austin881
phpBB SEO Team
phpBB SEO Team
 
Posts: 248
Joined: Wed Oct 28, 2009 12:16 am
Location: Boise, Idaho USA

Re: .htaccess not working properly on XAMPP

Postby dcz » Fri Mar 12, 2010 4:09 pm

You don't need to use any slash option with xampp (no ^/ as in your example).

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm


Return to Mixed SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 9 guests


 
cron