Find Jobs
Hire Freelancers

assist with htaccess file's rewrite/redirect rules

$30-250 AUD

Cancelled
Posted over 11 years ago

$30-250 AUD

Paid on delivery
Hello, Below is a htaccess mod_rewrite issue explained, that I haven't been able to resolve. I think there is a 5 minute fix, I hope, but am unsure, so please ask questions should the issue be unclear. I have a website with a lot of sub-domains and I would like a rule(s) for my 'htaccess file' so that All of the following related links for each sub-domain redirects to the sub-domains' respective Index file. In other words, all of the following should redirect to: [login to view URL] 1. [login to view URL] 2. [login to view URL] 3. [login to view URL] 4. [login to view URL] Just like all of the following links on another sub-domain should redirect to: [login to view URL] 1. [login to view URL] 2. [login to view URL] 3. [login to view URL] 4. [login to view URL] Here is a copy of my htaccess file, which is where I am 90% sure the problem lies: RewriteEngine On RewriteCond %{HTTP_HOST} ^[login to view URL] [NC] RewriteRule ^(.*)$ [login to view URL]$1 [R=301,L] ErrorDocument 404 / The sub-domains' Index file contains the following PHP code, as I store and manage the redirect-to links in a database: $domain = $_SERVER['SERVER_NAME']; require_once '[login to view URL]'; $domain = mysql_real_escape_string($domain); $sql = " SELECT redirect FROM redirects WHERE domain='$domain' "; $result = mysql_query( $sql ) or die(mysql_error()); $row = mysql_fetch_row($result); if( $redirect = $row[0] ) { echo '<meta http-equiv="REFRESH" content="0;URL=http://'.$redirect.'">'; } else { echo '<meta http-equiv="REFRESH" content="0;URL=[login to view URL]">'; } Payment will be made upfront into escrow and released upon the implementation of a working solution. Any questions, please ask before bidding. Thank you :-)
Project ID: 2461392

About the project

3 proposals
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
3 freelancers are bidding on average $30 AUD for this job
User Avatar
Hello,sir. I can help you. Let's start.
$30 AUD in 0 day
5.0 (30 reviews)
4.7
4.7
User Avatar
Hello! I can help you out!
$30 AUD in 0 day
4.9 (9 reviews)
4.1
4.1
User Avatar
please see pm. Thanks.
$30 AUD in 0 day
5.0 (1 review)
1.2
1.2

About the client

Flag of AUSTRALIA
Melbourne, Australia
5.0
75
Payment method verified
Member since Mar 11, 2005

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.