| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Account Closed | htaccess Questions-- Help please One thing I have not spent enough time learning about is the htaccess file....... It is finally biting me in the rump so now I have no choice but to learn about it... One of my sites, a store actually is using the htaccess to change .html to php basically -- The site is www.anonlinemall.com PHP Code: Everything works fine but now I am trying to add some extra pages that are html... One of the urls I cannot access is www.anonlinemall.com/smoking/ I turn off htaccess and it opens fine...... Can anyone help me out with this. I have tried everything. I know htaccess can be used to redirect and deny ip's etc but I have no idea how to bypass it....... Thanks...... Who ever answers this question for me I will give 10np's too........ I should say the first person that gives me the info that corrects this problem will get 10np's... Rich |
| |
| | #2 (permalink) |
| Buy my domains. | Change: Code: RewriteRule ^(.*)/(.*).html index.php?Operation=ItemLookup&ItemId=$1 [QSA,L] Code: RewriteRule ^(.*)/(.*).html?$ index.php?Operation=ItemLookup&ItemId=$1 [QSA,L] I don't see anything else that could be the problem. |
| |
| | #3 (permalink) |
| Senior Member | Code: RewriteEngine On RewriteRule ^index.html$ index.php RewriteRule ^(.*)/(.*)-search-(.*)-(.*)-(.*).html$ index.php?Operation=ItemSearch&SearchIndex=$1&$2=$3&Sort=$4&ItemPage=$5 [L] RewriteRule ^(.*)/(.*)-search-(.*)-(.*).html$ index.php?Operation=ItemSearch&SearchIndex=$1&$2=$3&Sort=$4 [L] RewriteRule ^(.*)/(.*)-search-(.*).html$ index.php?Operation=ItemSearch&SearchIndex=$1&$2=$3 [L] RewriteRule ^(.*)/browse-(.*)-(.*)-(.*).html$ index.php?Operation=ItemSearch&SearchIndex=$1&BrowseNode=$2&Sort=$3&ItemPage=$4 [L] RewriteRule ^(.*)/browse-(.*)-(.*).html$ index.php?Operation=ItemSearch&SearchIndex=$1&BrowseNode=$2&Sort=$3 [L] RewriteRule ^(.*)/browse-(.*).html$ index.php?Operation=ItemSearch&SearchIndex=$1&BrowseNode=$2 [L] RewriteRule ^(.*)/(.*).html$ index.php?Operation=ItemLookup&ItemId=$1 [L] RewriteRule ^(.*).html$ index.php?SearchIndex=$1 [L] ![]() p.s (.*) means $1(variable 1) , for eg in (.*)/(.*).html if you want the second variable (.*)/(.*) you must put Code: RewriteRule ^(.*)/(.*).html$ index.php?Operation=ItemLookup&ItemId=$2 [L] Last edited by ahtum; 06-26-2006 at 02:17 PM. |
| |
| | #5 (permalink) |
| Account Closed | Sorry guys, neither of these changes worked for me....... I am not sure if made the changes correctly though.. I am still a bit confused about this but I am learning... I think we are close... For this PHP Code: Thanks so much guys... |
| |
| | #8 (permalink) |
| Buy my domains. | Code: RewriteRule ^(.*)/(.*).html index.php?Operation=ItemLookup&ItemId=$1 [QSA,L] You could make the index of /smoking/ be .php so it won't be affected by the rewrite rules. I can't figure out any other way to edit the .htaccess right now to fix that. |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |