sailorsmokey Posted September 26, 2007 Share Posted September 26, 2007 Hi everyone. I'm a bit of a rookie, here. I have used ReWrite rules with my Web site successfully. However, I've started a second Web site that, until it grows, it residing in a subdirectory on my 1st Web site. The 2nd Web site has its own domain name pointed to that subdirectory (so www.autismcommunitystore.com points to www.watchesandthings.com/autism/). I initially set up a .htaccess file to work with the subdirectory. Now I want to get it so it works with the pointer domain (I want my links to be www.autismcommunitystore.com/view/17/ rather than www.watchesandthings.com/autism/view/17/). I've done some additional reading on the ReWrite rule, but I either don't understand what I'm reading, or haven't seen the answer to my question. Here's how my rewrite rule is set up: RewriteEngine on Options +FollowSymlinks RewriteBase /autism/ RewriteRule ^\.htaccess$ - [F] RewriteRule ^item/([0-9]+)$ item/$1/ [R] RewriteRule ^item/([0-9]+)/$ item.php?item=$1 RewriteRule ^view/([0-9]+)$ view/$1/ [R] RewriteRule ^view/([0-9]+)/$ view.php?category=$1 RewriteRule ^view/([0-9]+)/([0-9]+)$ view/$1/$2/ [R] RewriteRule ^view/([0-9]+)/([0-9]+)/$ view.php?page=$1&category=$2 RewriteRule ^viewsubcategory/([0-9]+)$ viewsubcategory/$1/ [R] RewriteRule ^viewsubcategory/([0-9]+)/$ viewsubcategory.php?subcategory=$1 RewriteRule ^viewsubcategory/([0-9]+)/([0-9]+)$ viewsubcategory/$1/$2/ [R] RewriteRule ^viewsubcategory/([0-9]+)/([0-9]+)/$ viewsubcategory.php?page=$1&subcategory=$2 RewriteRule ^viewsubcategory2nd/([0-9]+)$ viewsubcategory2nd/$1/ [R] RewriteRule ^viewsubcategory2nd/([0-9]+)/$ viewsubcategory2nd.php?category2nd=$1 RewriteRule ^viewsubcategory2nd/([0-9]+)/([0-9]+)$ viewsubcategory2nd/$1/$2/ [R] RewriteRule ^viewsubcategory2nd/([0-9]+)/([0-9]+)/$ viewsubcategory2nd.php?page=$1&category2nd=$2 RewriteRule ^/autism/feedback/([0-9]+)$ /autism/feedback/$1/ [R] RewriteRule ^/autism/feedback/([0-9]+)/$ /autism/feedback.php?page=$1 I tried a few logical guesses on how to make this work, but to no avail. Can anyone lead me to or show me how to get what I want? Of course, I am assuming that I can do this. Will the rewrite engine even work with a pointer domain? Thank you for helping me out.....I truly appreciate it! Quote Link to comment https://forums.phpfreaks.com/topic/70814-getting-rewrite-rule-to-work-with-pointed-domain/ Share on other sites More sharing options...
sailorsmokey Posted October 10, 2007 Author Share Posted October 10, 2007 Does anyone have any ideas on this? I'm really stuck here. Any ideas would really, really be appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/70814-getting-rewrite-rule-to-work-with-pointed-domain/#findComment-366548 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.