Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Old 10-11-2009, 12:15 AM   #1 (permalink)
Junior Member
 
Join Date: 02-05-09
Posts: 16
iTrader: 0 / 0%
Latest Blog:
None

goodluck4287 is liked by many
.htaccess consolidation and redirects with an anchor link

A few questions...

First, is there anything I can consolidate on this .htaccess and keep all of the functionality?

Is my htaccess file going to be hidden from users with lines 2-5 or is there something else I need to do?

My last one is probably the most fun. As you can see I have a redirect to www.mysite.com/index.php (both a WWW and .PHP redirect). However, my conflict is with the last line and that's partially because of what I just mentioned. I have a product pitch page which is on index.php and I also have a navigation button on my site that says "Order" which links you to index.php#Order (at the bottom of my page).

The conflict is that clicking on the index.php#Order link redirects you to index.php without the anchor. Anyone know how to make an exception to my rewrite rules so that my index.php anchor works properly?

Thank you so much for a full or partial answer to these questions!


Code:
DirectoryIndex index.php <Files ~ "^\.ht"> Order allow,deny Deny from all </Files> ErrorDocument 404 /404.php Options +FollowSymLinks RewriteEngine on Options +FollowSymlinks RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/ RewriteRule ^(.*)index\.php$ http://www.mysite.com/$1 [R=301,L] RewriteBase / RewriteCond %{HTTP_HOST} !^www\.mysite\.com$ [NC] RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L] redirect 301 /order.php http://www.mysite.com/index.php#Order
goodluck4287 is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
15,000 redirects casing huge htaccess file cesarcesar SEO Forum 0 08-12-2009 05:42 PM
Some help with .htaccess file and 301 Redirects Pairodime Coding Forum 7 04-12-2007 04:04 PM
Site Restructure - can I do 600 301 redirects in a .htaccess? bwb SEO Forum 2 09-28-2006 08:24 PM
Link redirects page and opens new window theChronic Coding Forum 1 04-17-2006 07:42 PM
.htaccess and redirects? Michael Allison Coding Forum 9 01-16-2006 07:06 AM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 10:05 AM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.