Jump to content

apache htaccess mod-rewrites


Recommended Posts

This is concerning a htaccess file and mod_rewrite.

 

i have two domains/urls,(just got the second domain/url today and am working on a webpage)

 

the first url being used for the root directory

 

the second i pointed to a folder inside the main/root directory which should load the webpage when i type in the url in the web browser.

 

however it only loads the webpage index.html file (when i rename the htaccess file from the original name htaccess to htaccess1) or when i type in the full path www.example.com/index.html.

 

the htaccess file is preventing the second url from loading the index.html file inside of the sub-directory. by just typing www.example.com. ( Note: the htaccess file was coded by another coder who created the first webpage, and he is no longer working with us )

 

i am trying to make the second url work as well with out having to type the full path www.example.com/index.html and with out messing up the code in the htaccess which works for the other domain name.

 

The current code looks like this. ( i use www.EXAMPLE.com in place of the working url )

 

<IfModule mod_rewrite.c> RewriteEngine on MultiViewsMatch Handlers Filters RewriteCond %{http_host} ^www.EXAMPLE.com [nc] RewriteRule ^(.*)$ http://EXAMPLE.com/$1 [r=301,nc] RewriteRule ^([^/\.]+)/?$ /category.php?cat=$1 [L] </IfModule>

 

if anyone can figure this out or let me know what to put in to make both domains work it would be great-Thanks

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...