4

have a wordpress website on my main domain

For the wordpress website i have this in my .htaccess file

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php
</IfModule>

# END WordPress

I just created an addon domain and wanted to use new rules for it

I created a .htaccess file and put it inside the addon folder eg /newaddon

In the .htaccess file i have:

Options -Indexes

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^readjob/(.*)/(.*)/(.*)/$ readjob.php?id=$1&amp;cat=$2&amp;title=$3
</IfModule>

The url stucture i have is this:

http://www.website.com/readjob/3/jobs/web-designers-potech-integrated-services/

But it keeps telling me link is broken

I dont know what to do, pls i need assistance

(pls i just learnt mod rewriting today, so clarity will be highly appreciated)

Thanks

1
  • This probably should be on stackoverflow
    – John Conde
    Oct 3, 2010 at 19:57

2 Answers 2

1

Replace &amp; with just & (it works here). If there are still troubles you may want to add [L] to the end (it means that if it matches processing of rules should stop) just in case there is a conflict. Finally check your set-up allows trailing slashes.

2
  • thank you so much, i have long replaced that, a friend on stackoverflow told me to add Options -Multiviews to it and it works now, bt it doesnt see the css and pics folder inside the addon domain, pls any idea?
    – Ogugua Belonwu
    Oct 4, 2010 at 16:54
  • Same scenario, if you can set up an isolated test of it, then turn on debugging and fire up gdb to see where it really looks for the files (personally I am forever hitting troubles when there is more than one RewriteRule). Alternatively you can just wrap up Apache in strace then look for the last few entries in the log. If you can post your server side folder layout and the relevant sections from your conf then it can be looked into, however that kind of question may be better on ServerFault/StackOverflow (as you've started you can post the link to it here though).
    – Metalshark
    Oct 4, 2010 at 18:19
0

Just merge your .htaccess files.

 <IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^readjob/(.*)/(.*)/(.*)/$ newaddon/readjob.php?id=$1&cat=$2&title=$3
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php
</IfModule>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.