Jump to content

Getting ReWrite Rule to work with Pointed Domain


sailorsmokey

Recommended Posts

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!

Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.