Wordpress cookieless domain .htaccess rewrite

Closed Posted 5 years ago Paid on delivery
Closed Paid on delivery

currently I use this rewrite in my .htaccess to cache bust some of my static files on my wordpress website

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.+)\.(.+)\.(js|css|PNG|jpg|png)$ $1.$3 [L]

This makes a url like this

[login to view URL]

which is really located at

[login to view URL]

work

and this works

I added a cookieless subdomain which is [login to view URL] which points to [login to view URL]

so in my subdomain this

[login to view URL] shows you the file that is really located at

[login to view URL]

I need to know what to add to my htaccess to make

[login to view URL] show the file at

[login to view URL]

the cache busting part will always be either a filemtime (digits only) or digits with dots (version) like this [login to view URL]

so basically I need something like this if file is [login to view URL](js|css|PNG|jpg|png) to point to [login to view URL](js|css|PNG|jpg|png)

I am not sure if need to edit my current rule or add another rule and if it needs to go before or after - and I need it to work with the wordpress rules which are the standard:

# BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /[login to view URL] [L]

</IfModule>

# END WordPress

CSS PHP WordPress

Project ID: #17077632

About the project

11 proposals Remote project Active 5 years ago

11 freelancers are bidding on average $26 for this job

gatecorp

I am a Vietnam based Freelancer offering exceptional quality work for my clients from last 10 years. Please leave a message to review my samples.

$23 USD in 1 day
(214 Reviews)
6.9
sumonst21

Hello, I'm WordPress expert, and i have resolve this issue so many times. I understood that you want to use a cookie less sub-domain for your static files and I'll do the whole thing for your and also will guild you More

$25 USD in 1 day
(157 Reviews)
6.7
baniksubir1

Dear Hiring Manager, I read your project (Wordpress cookieless domain .htaccess rewrite) and ready to start work on it I'm Good at CSS, PHP, WordPress Hi katiehaugland! Please Send me a message so that we can discuss More

$30 USD in 3 days
(95 Reviews)
6.3
envisionops

Hi there, I understand you hired someone previously and it didn't workout. I can fix this in few hours. Basically we need to redirect all files to php middleware code which will take care of it. Lets chat and get it d More

$40 USD in 0 days
(97 Reviews)
6.2
radimosve

Hi!. I am available right now, how are you? I am interested in your project and would like to discuss the project with you. I always deliver on time and on budget feel free to check my feedbacks and portfolio. I unde More

$30 USD in 6 days
(56 Reviews)
5.6
nizamulamy

Hello Sir, I have read your project description. I can assist you with your wordpress .htaccess file, I'll provide you 100% quality with efficiency. I'm a Website developer and designer I'm working on wordpress, More

$25 USD in 1 day
(90 Reviews)
5.4
webcast

Hello katiehaugland, I am good at : 1. WordPress web development 2. PSD to HTML 3. Responsive web development 4. Graphics Designing 5. Photoshop 6. PHP 7. html + CSS Styling 8. js & jQuery. you can check More

$30 USD in 1 day
(103 Reviews)
5.5
vimal7320

Hey Mate Why you making this too complicated , We can use 301 redirect plugin for it. I am experienced with that.

$25 USD in 1 day
(2 Reviews)
2.6
muntasirmahbub0

Why you hire me ? * Fast and responsive delivery. * Understanding buyers requirement * Provide best value for money. * Maintain a good relationship after the project. * 24 hrs customer support.

$25 USD in 1 day
(1 Review)
0.0