Search Results

Search: Posts Made By: EXT3FSCK
Forum: Web Development 12-10-2010
4,534
Posted By EXT3FSCK
While that will change all the code to look for...
While that will change all the code to look for that URL.

The point of making this rewrite rule is to just affect certain URLs, not everyone. So instead of changing a piece of code that can affect...
Forum: Web Development 12-09-2010
4,534
Posted By EXT3FSCK
Regex to rewrite URL to another URL based on HTTP_HOST?
I am trying to find a way to test some code, but I need to rewrite a specific URL only from a specific HTTP_HOST

The call goes out to
...
6,199
Posted By EXT3FSCK
That gives me the output of: ...
That gives me the output of:


elseif (req.http.host|~ "^(www.)?labourtv.net$|www.myertec.co.uk myertec.co.uk www.labourtv.net") {


Close, but I don't want it to add an extra | between...
6,199
Posted By EXT3FSCK
sed replace spaces between quotes with a variable
I have lines with:


elseif (req.http.host ~ "^(www.)?edificationtube.com$|www.edificationtube.org www.edificationtube.net edificationtube.org www.edificationtube.com edificationtube.net") {...
5,460
Posted By EXT3FSCK
Thanks Alister, this did the trick perfectly. ...
Thanks Alister, this did the trick perfectly.

Thank you, I can't thank you enough.
5,460
Posted By EXT3FSCK
Sweet, you sir, are a god... Can you tell me...
Sweet, you sir, are a god...

Can you tell me what does this do?

"int(i)){i+=0.5}1"

What can I change if I want it to do every 3 instances or maybe start like at 4000 for the integer?
5,460
Posted By EXT3FSCK
Pretend this file has thousands of instances that...
Pretend this file has thousands of instances that say PORT

I want it to replace every two instances it finds that say PORT with a unique number. None are the same so incremental is fine. But every...
5,460
Posted By EXT3FSCK
That is going to replace all instances, i dont...
That is going to replace all instances, i dont want that. i want it to replace every two instances it finds of PORT . That is my dilema right now.

Thanks

---------- Post updated at 02:28 PM...
5,460
Posted By EXT3FSCK
No, I want to replace both of them. That is...
No, I want to replace both of them.

That is why I wanted it in a pattern, for every 2 instances it finds the word "PORT" to replace it with a unique number, and every 2 instances it finds to...
5,460
Posted By EXT3FSCK
Can sed replace every 2 instances it finds in a file? Pattern.
My goal is to make a script to find/replace the variable "PORT" with a unique number.

Like the following


<VirtualHost 174.120.36.236:PORT>
ServerName architect.com.ph
ServerAlias...
1,420
Posted By EXT3FSCK
Need help with mod_rewrite rule, redirect
I have to redirect



http://www.domain.com/([^/]*)/([^/]*)-hotel-deals.html


to


http://www.domain.com/([^/]*)/([^/]*)-hotel-deals



where of course ([^/]*) are dynamic.

Any...
33,362
Posted By EXT3FSCK
sed - how to remove trailing slashes
I know you can remove trialing slashes using:

#echo "/tmp/one/two/three////" | sed "s,/$,,"
/tmp/one/two/three///

But I want to know how to make it remove all trialing flashes in the front,...
6,314
Posted By EXT3FSCK
I have these lines: rewrite...
I have these lines:


rewrite ^action/myprofile/$ myProfile.php?%$query_string;
rewrite ^action/viewfriends/([^\/]+)/$ viewFriends.php?user=$1&%$query_string last;
rewrite...
6,314
Posted By EXT3FSCK
It kinda worked. But kinda wanted it to work...
It kinda worked.

But kinda wanted it to work with some expressions.

I had this:

awk '/\^[a-f]/{sub(/\^[a-f]/,"^/[a-f]")}{print}'

It gave me a result of this:

RewriteRule...
6,314
Posted By EXT3FSCK
Replace if regex on specific column matches expression?
I am attempting to convert rewrite rules to Nginx, and since due to the mass amount of rewrites we must convert, I've been trying to write a script to help me on a specific part, easily.

So far I...
Showing results 1 to 15 of 15

 
All times are GMT -4. The time now is 02:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy